Do you know where your variables are? | |
PerlMonks |
Re: Need a regex for matching multiple words within parenthesesby hanenkamp (Pilgrim) |
on Dec 12, 2003 at 18:42 UTC ( [id://314380]=note: print w/replies, xml ) | Need Help?? |
There are a couple obvious problems. First, (.). in the third match should contain a quantifier and you should be careful of "." as a greedy match will swallow the end parenthesis and cause the match to fail. I'd use Second, you should have another backslash before the very last closing parenthesis. Note: I didn't take the time to test these recommendations. Update: Er...duh, don't do that... Update: That is, don't do the striked one, it will get the first word (or more if there is no whitespace between), but the other works fine. Sorry, I was unclear.
In Section
Seekers of Perl Wisdom
|
|