Hacker News new | ask | show | jobs
by munger 4715 days ago
and if you do need a dynamic pattern, this is what preg_quote() is for.

http://php.net/manual/en/function.preg-quote.php