good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Re: Re: regular expression-xeroxby kvale (Monsignor) |
on May 03, 2004 at 21:42 UTC ( [id://350149]=note: print w/replies, xml ) | Need Help?? |
My solution is correctly answers the particular requirement the OP stated: convert the character class 'ABCD' to a form that uses alternation. If one extrapolates that requirement to all alphanumerics, them my type of solution still works.
If one exptrapolates to metacharacters like those in 1. and 2., or to predefined POSIX classes or Unicode characters, as in 3., then obviously the parser and translator must be extended to handle these situations. But for the simple requirements stated by the OP, a simple solution is best. -Mark
In Section
Seekers of Perl Wisdom
|
|