T O P I C R E V I E W |
peck797 |
Posted - Feb 17 2012 : 11:40:44 AM Unfortunately, I can't reproduce this behaviour all the time but I have found one particular regex string where it seems to be reproducible and repeatable on my PC.
I have the following definition:
regex_ = new Regex( @"^\\s*\\[\\s*" + @"(?<longHem>(?:N(?:orth)?)|(?:S(?:outh)?))\\s*\\.\\s*" + @"(?<longDeg>(?:\\+|\\-)?\\d+)\\s*\\.\\s*" + @"(?<longMin>\\d+)\\s*\\.\\s*" + @"(?<longSec>\\d+(?:.\\d*)?)\\s*,\\s*" + @"(?<latHem>(?:E(?:ast)?)|(?:W(?:est)?))\\s*\\.\\s*" + @"(?<latDeg>(?:\\+|\\-)?\\d+)\\s*\\.\\s*" + @"(?<latMin>\\d+)\\s*\\.\\s*" + @"(?<latSec>\\d+(?:.\\d*)?)\\s*" + @"(?:,\\s*(?<alt>(?:\\+|\\-)?\\d+(?:.\\d*)?))?\\s*" + @"\\]\\s*$", RegexOptions.Compiled | RegexOptions.IgnoreCase);
If I put the caret before some of the ')' characters in part of that expression and hit the ')' key on my keyboard, then VAX "absorbs" the ')' and jumps over it. This is despite the fact that, IMO, it's a string and shouldn't be being parsed but it even happens if there is, in fact, a missing ')' somewhere in the expression (which is why I hit the problem in practice!)
For example, try putting the caret before the final ')' in the penultimate string part:
+ @"(?:,\\s*(?<alt>(?:\\+|\\-)?\\d+(?:.\\d*)?))?\\s*"
and hit the ')' key. For me, it jumps over that character rather than adding a new one. It will do this even if you delete one of the earlier '(' characters on the same line.
If you can't reproduce it, then I'll go back to sleep; it's not life threatening but I seem to have found one case where this occasional glitch is 100% repeatable for me!
Dan
|
2 L A T E S T R E P L I E S (Newest First) |
peck797 |
Posted - Feb 18 2012 : 01:50:07 AM It's good to know that you can reproduce it.
Dan
Water that is too pure has no fish; whether that be red fish or blue fish.
|
feline |
Posted - Feb 17 2012 : 7:46:45 PM I am seeing the same effect here. Thank you for the clear description. This looks like it is covered by:
case=3942
Hopefully you don't have to many cases where you run into this rather unhelpful problem. |
|
|