in reply to Debug and workaround help
You're not checking for success in your first match, so it could be silently failing. Also, definately consider using quotemeta on $str2Brepl.
Dave