I'm trying to store Regex values in the DB, later to be used for custom validation. I'm storing a Regex like this:
[a-zA-Z\''\"]+
(Two single qoutes in order to get one in the DB):
[a-zA-Z\'\"]+
When i extract this regex, I get an error while Filling the dataset:
Incorrect syntax near '\'. Unclosed quotation mark after the character string ']+''.
UPDATE #TEMP2 SET CandidateNameRegex='[a-zA-Z\'\"]+'
I've tried different variations:
'[a-zA-Z\''\"]+'
'[a-zA-Z\''\""]+'
'[a-zA-Z\''\\"]+'
'@[a-zA-Z\''\"]+'
'[a-zA-Z\'\"]+'
But none seem to do the trick.
So, How do we extract single quote from the DB without breaking the string?