in reply to Y.A.R.M.
See:
$_ = "ab_"; print "\\b matches\n" if m!ab_\b!; $_ = "ab*"; print "\\b matches\n" if m!ab\*\b!; [download]
So if you change your regex to:
m@((\*|_)\S+\b)(.+?)(\b\S+\2)@s [download]