if (/string=\"(\d+)\"|static-address\/(.*?)\"/) { my $id = defined($1) ? $1 : $2;
And then there's this:
if (/string=\"(\d+)\"/ || /static-address\/(.*?)\"/) { my $id = $1;
In reply to Re^4: help with regex
by ikegami
in thread help with regex
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |