Why does the following StringReplace pattern match:
StringReplace["blah *hello* blah", ("*" ~~ ShortestMatch[str__] ~~ "*") :>
("<u>" <> str <> "</u>")]
(* blah <u>hello</u> blah *)
but not when bracketing the pattern with WordBoundary:
StringReplace["blah *hello* blah", (WordBoundary ~~ "*" ~~
ShortestMatch[str__] ~~ "*" ~~ WordBoundary) :> ("<u>" <> str <> "</u>")]
(* "blah *hello* blah" *)

ShortestMatchis now superseded byShortest– rm -rf♦ Oct 20 '12 at 21:38