in reply to Regex Ignore Case
I'm not really sure why you'd want to do this. Things like this make code difficult to maintain. If you came back to the code in say 6 months and added a regular expression you might wonder why it wasn't matching properly. All for saving yourself 1 keystroke per regexp.
Also, case insensitive regexps make the regular expression do more work. That said, you could probably use Filter::Simple to impliment something like this:
Untested, possibly broken, almost certainly stupid code follows:
Then you'd just "use rxMatchAnyCase" in your script.package rxMatchAnyCase; use strict; use Filter::Simple; FILTER_ONLY( regex => sub { $_ = "(?i:$_)" } ); 1;
|
|---|