Your skill will accomplish what the force of many cannot |
|
PerlMonks |
Nesting regexenby colink (Novice) |
on Jul 11, 2005 at 04:55 UTC ( [id://473821]=perlquestion: print w/replies, xml ) | Need Help?? |
colink has asked for the wisdom of the Perl Monks concerning the following question: I needed to reformat a bunch of Perl code, so I began writing this as an exercise to try and learn regular expressions better, but I've gotten stuck and I'm not sure why. It's a very light weight perl parser that handles just a subset of perl. Here's the code:
This is the line I'm trying to parse:
And this is the formatted output, incorrect:
The $sub_args regex is only matching the second set of parentheses, and I have no idea why. Can anyone clue me in?
Back to
Seekers of Perl Wisdom
|
|