in reply to about word boundary in RE

The whitespace between the words prevents the match.

my $test = "asd asd"; if ($test =~ /(.+\b)\s\1/) { print "Found $1 repeated\n"; }

Replies are listed 'Best First'.
Re^2: about word boundary in RE
by anaconda_wly (Scribe) on Apr 02, 2013 at 07:52 UTC
    Isn't there a word boundary before the whitespace? If (.+\b) already match, why I need the \s? I thought the output will be the first "asd" but not.