Samman_Mahmoud has asked for the wisdom of the Perl Monks concerning the following question:
Hii I want to get the matched group name after comparing string to regex expression
while($string=~m/(?<Word>(\w+)?<Digit>(\w+))/g) { print "Match : $1 GroupName: "; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Retrieving Regex matched Group name
by Kenosis (Priest) on Feb 18, 2013 at 23:11 UTC | |
by Samman_Mahmoud (Initiate) on Feb 19, 2013 at 21:23 UTC | |
by Kenosis (Priest) on Feb 19, 2013 at 22:03 UTC | |
|
Re: Retrieving Regex matched Group name
by CountZero (Bishop) on Feb 18, 2013 at 22:14 UTC | |
|
Re: Retrieving Regex matched Group name
by LanX (Saint) on Feb 18, 2013 at 22:54 UTC | |
|
Re: Retrieving Regex matched Group name
by frozenwithjoy (Priest) on Feb 18, 2013 at 22:51 UTC |