Don't ask to ask, just ask | |
PerlMonks |
A challenging problem in perl regular expressionby yai (Initiate) |
on Jan 08, 2009 at 01:06 UTC ( [id://734772]=perlquestion: print w/replies, xml ) | Need Help?? |
yai has asked for the wisdom of the Perl Monks concerning the following question:
Can anyone help me to solve this problem?
I am looking for a single perl regular expression that can replace all occurrentcs of not 'JAZZ' with 'a'.
For example, "aJAZJAZZa" should be change to "aaaaJAZZa"
I tried to use lookaround feature in Perl but I can't find a solution yet. I sill can not disambiguate between the last 2 'Z' in 'JAZZ'.
Back to
Seekers of Perl Wisdom
|
|