I am working on a project. This project have a user interface that we wrote in PHP. In the management part, there is a form input where the user needs to enter a regular expression. As I know, I can not check if is a regex or not, because every string is a regex. What I want to do is check whether this input is proper or not? Which way I can do it?
Share
It’s very hard to do this by analysing the regex (short of actually parsing the regex itself.
I suggest you rather use conservative settings for
pcre.backtrack-limitandpcre.recursion_limit.