I was using ereg_replace function to replace all tags in my HTML with blank. Tags in my case look like this: {{AGE}} {{NAME}} {{EMAIL_ADDRESS}}
I was using this sentence (was removed in PHP 7):
$my_string = ereg_replace("\{\{[a-zA-Z_0-9]+\}\}", "", $my_string);
Now I would like to use alternative sentence to ereg_replace and I tried with this:
$my_string = preg_replace("\{\{[a-zA-Z_0-9]+\}\}", "", $my_string);
It throws out error. Looks like 1st parameter for preg is not same as for ereg. Can someone tell me how to fix it to replace all tags which have format {{something here}}
Thanks.