I'm reading column constraints from data base.
for example:
(substring([name],(1),(1))='P' OR len([name])>(2) AND len([name])>(4) AMD (len(name)>5 OR len(name)<4))
The idea is that every open bracket must be closed.
The brackets around the numbers and around the functions are automatically inserted by the SQL management studio when we are adding new Check Constraints.
Can anyone suggest how to parse these strings?
My goal is to convert the Column Check Constraints into C# code so that I can build Entity validators. All database tables are mapped into Entities classes.