I can’t seem to figure out the regular expression to match any string that’s in the format
**(anything that's not **)**
I tried doing this in php
$str = "** hello world * hello **";
$str = preg_replace('/\*\*(([^\*][^\*]+))\*\*/s','<strong>$1</strong>',$str);
but no string replacement was done.
You can use an assertion
?!paired with a character-wise.placeholder:This basically means to match any number of anythings
(.)+, but the.can never occupy the place of a\*\*