How to validate that a regular expression is valid in Java using JavaScript
<p>I am using web forms to let the user specify a regular expression which is later matched in java. I want to check the regular expression provided by the user to see if it is valid. Of course I want to do it on both ends - the java part is easy.</p>

<p>But what would be the best way to check that the regular expression is valid in javascript?</p>

<p>Thanks</p>
