We don't bite newbies here... much | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Id do something like this myself. Except id probably not use look ahead and instead would approach it a different way. I was annoyed with the lookahead myself, but it's unlikely to be a big deal, and I could not at the time see any way to avoid it. After some thinking, however, I believe I see a way to avoid looking ahead more than once -- just include it in the first alternation, which is matched precisely once on a successful match (anchored to the beginning of the string, and the only alternation that can match there):
... or, in the less-terse form:
I think that's the best I got. Match that? :)
print "Just another Perl ${\(trickster and hacker)},"
In reply to Re^3: Arbitrary number of captures in a regular expression
by Sidhekin
|
|