I'm looking to capture the value of the 8 digit number found in the second regex
foreach $arr ("foo abc12345 def12345678 bar") { if (($arr =~ /(\w*)(abc)(\d{5})/) && ($arr =~ / (\w*)(def)(\d{8})/ +)) { print $3; # "12345678" } }
In reply to Re: Question on Regex grouping
by Anonyrnous Monk
in thread Question on Regex grouping
by ajguitarmaniac
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |