Regex case sensitivity broken |
Post Reply |
Author | ||
Alec Skelly
Guest Group |
Post Options
Thanks(0)
Posted: 06 April 2004 at 10:10pm |
|
On version 1.2.0.212 the following regex will not match the text "Subject": (Subject) But this will match: ((?i)Subject) If there is a capital letter in the regex, (?i) must be used to detect even an exact match in the text. If the regex is in all lowercase, it will match regardless of the case of the text even without (?i). If case sensitivity is explicitly turned on with (?-i) and the regex is in uppercase, it will not detect even an exact match in the text: ((?-i)SUBJECT) does not match "SUBJECT" in the text. I hope I'm making sense... Thanks
|
||
Ronny T
Guest Group |
Post Options
Thanks(0)
|
|
Hi I think you got it backwards, (?i) makes in case INsensitiv... But I see your point I tested: Subject will not find Subject subject will find Subject ((?i)subject) will fine Subject also... etc |
||
Alec Skelly
Guest Group |
Post Options
Thanks(0)
|
|
You can prefix any of the modifiers with a - to do the opposite, so (?i) makes it case insensitive and (?-i) makes it case sensitive.
|
||
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |
This page was generated in 0.271 seconds.