Think about Loose Coupling | |
PerlMonks |
Re^3: Parenthesis grouping into regexes.by aramisf (Beadle) |
on Apr 26, 2012 at 18:45 UTC ( [id://967435]=note: print w/replies, xml ) | Need Help?? |
Labelling groups (with (?pattern) regex) showed me what was happening. It is all clear now.
Many thanks to everyone, specially BillKSmith! I was having a trouble when using $1, $2... because I didn't know they exact behaviour. The problem I had was with the parenthesis inside $ip4 regex, causing $2 to have an ip address, $3 had the match inside the parenthesis in $ip4, and the prefix I expected put into $4:
Now I understand how $1, $2, $3... are set.
In Section
Seekers of Perl Wisdom
|
|