Read perlre on saving parentheses.if (/\b(API|APIN|UWI)\s*\./) { somesub($1); }
Update: note that my regexp isn't equal to yours. It instead matches what you probably wanted it to match. The difference is due to the vertical bar | construct. Your original regexp matches \bAPI or APIN or UWI\s*\..
In reply to Re: Quick question on matching
by kappa
in thread Quick question on matching
by licking9Volts
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |