Posted 20 years ago
by Boyd
-
Sr. Software Developer,
Patterson Consulting, LLC
I noticed some odd matching with Regular Expression searches when "Match Case" is turned off. Lets say I have the following values:
ab
Ab
aB
AB
And I search for the following RegEx and "MatchCase" is turned OFF:
a[B]
This regex will match on all four items as expected. If I change to the following RegEx and leave "MatchCase" turned off:
a[Bc]
It only matches on "aB" and "AB". The case of "a" is still disregarded, but the case of "B" is now being enforced. The same issue applies when ranges are used within a RegEx like the following:
a[A-Z]
Sorry I missed these things during the 3.0 Beta phase :(
ab
Ab
aB
AB
And I search for the following RegEx and "MatchCase" is turned OFF:
a[B]
This regex will match on all four items as expected. If I change to the following RegEx and leave "MatchCase" turned off:
a[Bc]
It only matches on "aB" and "AB". The case of "a" is still disregarded, but the case of "B" is now being enforced. The same issue applies when ranges are used within a RegEx like the following:
a[A-Z]
Sorry I missed these things during the 3.0 Beta phase :(