or, in two stepssub get_arg { shift =~ /="?([^="])/; $1; }
sub get_arg { my ($x) = shift =~ /="?([^="])/; $x =~ tr/"'//; $x; }
------
We are the carpenters and bricklayers of the Information Age.
Don't go borrowing trouble. For programmers, this means Worry only about what you need to implement.
In reply to Re: Help with regexp
by dragonchild
in thread Help with regexp to capture quotes
by duperdog
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |