The short answer is yes. The particular character used is not important; usually it should be something that does not appear in the template. For example, they are all equivalent:
<?php
preg_replace("@(<\?[^>]*>)+@", "", $content);
preg_replace("/(<\?[^>]*>)+/", "", $content);
preg_replace("!(<\?[^>]*>)+!", "", $content);
?>
The reason a character is needed is because modifiers can be added after the expression. For example, to search for a case insensitive case, you can use:
<?php
preg_replace("@(<\?[^>]*>)+@i", "", $content);
?>
source
share