Perl: the Markov chain saw | |
PerlMonks |
How do I match this without lookbehind?by tedv (Pilgrim) |
on Dec 08, 2000 at 05:48 UTC ( [id://45668]=perlquestion: print w/replies, xml ) | Need Help?? |
tedv has asked for the wisdom of the Perl Monks concerning the following question:
Suppose I have a string that matches /^(\~?.)*$/
and I want to split it into each atomic piece
that would be matched by (\~?.). How would I
code such a regular expression for split? I'd
like to use lookbehind, crafting an expression that says,
"Split after every non-tilde character", but my O'Reilly
Regular Expression book says that perl doesn't support
lookbehind. Any suggestions?
-Ted Originally posted as a Categorized Question.
Back to
Seekers of Perl Wisdom
|
|