Escaping Ordinary Characters in Regex in PHP
The modifier X causes the escaping
of an ordinary character to result in an error. Without this
operator, ordinary characters can be escaped,
they will still represent themselves
(exception: digits, they will become backreferences).
Let's look at an example:
<?php
preg_replace('#x\@x#X', '!', 'x@x'); // error, @ is not a special character
?>