Perl-Sensitive Sunglasses | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
What about $someRegex = "(aA|Aa).*";...what effect should that have? Or what about $someRegex = "(?!aa)[Aa]+.*"Basically, what you're asking for is not feasible in the general case. If you know that $someRegex will always be very simple, it becomes tractable; you can use something like YAPE::Regex to parse the regex and match elements thereof to the extracted string to determine which characters' case needs to change. But for arbitrary regexes, it gets hard quickly. Depending on what you actually need this for, you may find it simpler to request both a regex and a case template, or to have your input take the form of a restricted pattern that you yourself can then translate into a regex and a case template. In reply to Re^3: regex capture case
by Porculus
|
|