$_ = "ab_"; print "\\b matches\n" if m!ab_\b!; $_ = "ab*"; print "\\b matches\n" if m!ab\*\b!; #### m@((\*|_)\S+\b)(.+?)(\b\S+\2)@s