I want to create a website where users can test regular expressions (there are many out there already...such as this one: <http://www.pagecolumn.com/tool/pregtest.htm>). Basically, the user provides a regular expression and some sample text, and the results of the regex evaluation will be spit back.

I want to evaluate the regex on the server side with the PHP "preg\_\*" functions. Is there a way to sanitize the supplied regex? What are the security vulnerabilities that I should be concerned about?