I have a piece of code in c# that checks, if a value is a valid regex pattern.
Code is straight forward:
try { System.Text.RegularExpressions.R
Try this:
*
BTW, in Java there is a method to compile a string to a pattern and it throws an exception with precise error diagnostic.