Problem: I have an Application (in C#) that uses a regex from a SQL Table Column to check certain things. The details of that don't really matter for the question.
The thing is: "Key" users can make entries to that table (not through the Application but directly :( ). Now it happens from time to time, that they mess up regex syntax which leads to the Application to fail and I cannot change code of the Application.
What I thought of was: maybe there is a way to have MS SQL server check Regex syntax on insert and fail the insert if incorrect.
All search results I found deal with how to use regex in TSQL for SELECT etc. But that is not what I need. I just want the regex's syntax be checked and fail the insert if it is incorrect. Also the semantics of the regex is irrelevant. I just want the program to not fail with an exception. If the regex does not do what the user expects, then that's a different story.
Has anybody done this before or has an idea how this could be done? "That's impossible" would also be an appreciated answer, so I don't have to look any further and can turn to other approaches.