P is for Practical | |
PerlMonks |
Why does this simple grouping regex not match?by december (Pilgrim) |
on Feb 28, 2011 at 13:30 UTC ( [id://890557]=perlquestion: print w/replies, xml ) | Need Help?? |
december has asked for the wisdom of the Perl Monks concerning the following question: Hello fellow monks, A quick question: Why doesn't the first regex match while the second does?
It's probably very simple and it has something to do with the use of grouping brackets instead of regular capturing brackets, but I don't seem to get why one works and the other doesn't – it's Monday and so far my brain has refused to accept that fact. Thanks for any pointers! EDIT: It's a typo. I overlooked the fact I typed an equal sign instead of a colon, accidently making it a look-ahead regex. Monday just isn't my day. Sorry folks!
Back to
Seekers of Perl Wisdom
|
|