Search With a Regular Expression (Containing a Substring in a Variable)

You need to enclose the search expression with ` in the post or use the escape backslash \, otherwise, the two * are taken to be a Markdown italic code. I thought you missed the * until I quote it.

I am able to get the result correctly:

Maybe you have something else in the string, such as a linebreak?

@ccstone's advice is very good: