regexp {\m\$f\M} { $f }
should be a match.
Can someone explain why not?
Because \m and \M anchor at the beginning and end of a word, and a word is
defined as "a sequence of word characters that is neither preceded nor
followed by word characters. A word character is an alnum character or an
underscore (_)."
So, $ is not a "word", hence the expression does not match.
Michael
Do you have to make it sound so obvious? :*)
Doh! - and thanks