Allow slashes in filter regular expressions

User's regular expressions need escaping before passing them to
preg_match()