I am writing a form validation class and wish to include regular expressions in the validation. Therefore, the regex provided isn't guaranteed to be valid.

How can I (efficiently) check that the regex is valid?

Edit
Report