Is the Regular Expression validation tool broken in 10.1?
Hello,
The R# Regular Expression validator tool no longer works for me in version 10.1. Version 9 is ok. Version 10 is ok. (Other members in my team have older versions of R#)
I have some regular expressions that were developed and tested using a version of R# earlier than 10.1. Today I came to make a simple change to one of them. Having made it, I was suprised to find that the validation tool showed it to be incorrect. I rolled out my change and the validation tool STILL showed it to be incorrect!
Here is a simple example.
Regular expression = "^ABC$"
Test string "ABC"
9.1 says Match
10.0 says Match
10.1 says No Match
10.1 says Match only if I remove the trailing '$' character.
I have none of the regular expression options selected. I do not have the "Check lines separately" check-box ticked. I do not have any additional lines under the test string within the tool. I do not have any white-space beyond the end of the characters shown. I do not have any whitespace prior to the characters shown.
This simple C# script returns 'true', as expected:
var reg = new Regex("^ABC$");
var result = reg.Match("ABC");
Console.WriteLine(result.Success);
Is the validation tool broken now in terms of its handling of the '$' anchor character?
Regards
David Razzetti
Please sign in to leave a comment.
Hello David
Please send me a screenshot of "Validate Regular Expression" window where R# shows you the error. Since R# matches mentioned string for me.
Thanks!
Having stopped and re-started VisualStudio 2013 for an un-related reason, it now works properly for me.
I have witnesses who watched me put in the expression and the test string and saw that it didn't match with the '$' sign present.
What ever was wrong must be very obscure, I have tried re-doing all the things I was doing when it wasn't working and its flawless now.