No error. You must have omitted the spaces before and after BLAH.
(If you select, copy, and paste the code, no error occurs.)
The effects are more obvious with these:
"/$($string.TrimStart())/"
"/$($string.TrimEnd())/"
"/$($string.TrimStart().TrimEnd())/"
You can also see the available methods with
$string|gm