What the Book's RE is matching is:
Word Boundry, followed by a '1 or more character' word
Followed by space
Followed by a word-boundry
Followed by the Same word
Your RE is missing the SPACE at the end of the word found, and are trying to capture the word boundry '\b' inside the parens, which is meaningless.
In reply to Re: Prog. Perl 3rd Ed. Regex Question
by NetWallah
in thread Prog. Perl 3rd Ed. Regex Question
by makar
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |