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
Here's another one. Anything that ends in a single backslash (dangling backslash) is invalid.
BOOM\