XP is just a number | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
I'm going through the perl regex tutorial meticulously to try to start filling in the gaps in my regex knowledge and I came across this little nugget: "don't" =~ / .+? \b{wb} /x; # matches the whole string I know what the "x" modifier does. But I have no earthly idea what \b{wb} character is or how it works. The tutorial provides no explanation except to say something vague about using it to match apostrophes. So I did a little searching and found this. But this still sheds no light for me on why throwing this in after ".+?" should cause it to match the whole string "don't". Doesn't ".+?" just match "d"? Why should \b{wb} suck up the rest of the string?
$PM = "Perl Monk's"; In reply to What does \b{wb} in a regex do? by nysus
|
|