RegExp wrapper for PHP.