I have a string in which I want to replace the text [[signature]]
with a given value, but because it is encoded, the text looks like %5B%5Bsignature%5D%5D
.
How do I replace this using a regular expression? This snippet works, but only if the string is not encoded:
$replace = preg_replace('/\[\[signature\]\]/', 'replaced!', $html);