good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Unless I'm missing something, the technique you describe is essentially the one I described in my original post as the technique I'd use in 5.8 (and was hoping for something more concise).
/(?(?{ whatever() })|(?!))/
Update: halley replied via /msg. His post was describing the same technique but gives more details for the benefit of on-lookers. To clarify how I see this being used here's the code example from my patch to perlre:
In reply to Re^2: Regex code assertion should be able to fail
by nobull
|
|