Welcome to the Monastery | |
PerlMonks |
quick question about parenthesis and regular expressionsby cranberry13 (Beadle) |
on Nov 04, 2003 at 09:47 UTC ( [id://304360]=perlquestion: print w/replies, xml ) | Need Help?? |
cranberry13 has asked for the wisdom of the Perl Monks concerning the following question:
Hello there!
I have a quick question about using regular expresssions. I want to match $word =~ /absorb|absorbs|absorbed/i
and save the match in $1 (and supposing there can only be one match), how do I place the 'parenthesis'? $word =~ /(absorb|absorbs|absorbed)/i What am I doing wrong?
Back to
Seekers of Perl Wisdom
|
|