>perl -wMstrict -le "my $line = 'Id=\"123\" foo >987<'; my ($Rkey_id, $Rkey_val) = $line =~ /Id=\"(.*?)\".*?>(.*?)</; print $Rkey_id; print $Rkey_val; " 123 987
Update: see also Set variables from m//.
In reply to Re: Regular Expression
by AnomalousMonk
in thread Regular Expression
by Sun751
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |