How Validate Regular Expression Syntax in PHP?

By simple.fatima ·
Is there any way to check and validate regular expression syntax before processing it in php.
I've a scenario in which user input regular expression and my piece of code process user input regular expression, but validation is necessary before processing it and message if invalid regular expression syntax.
such as, '/[abc]/'
User inputs, '/[abc/'
the code prompt an error because closing ']' is missing!
Kindly suggest solution!

This conversation is currently closed to new comments.

0 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Answers

Share your knowledge
Back to Web Development Forum
0 total posts (Page 1 of 1)  

Related Discussions

Related Forums