parsing regular expressions
want to parse the regular expressions and send the result string to database to query the result. Means if i get the
example
value "^abc" should return the value "%abc" (means search for the string "abc" at the begging of the source)
"^abc$" should return "abc" (means search for the string "abc" as the only content within the source)
"\^s" should return "%^s" ( means search for the char ^ and followed by char 's' within the source)
^XYZ\.com$ should return "%XYZ.com" (means search for XYZ.com)
i have some more expressions like this supported by most of regular expression process engines.
Is there any predined function to do this in c# or sql server?
Please advice me.
Thanks
Re: parsing regular expressions
Welcome to the forum :wave:
Rather than writing your own parser for doing a database search, maybe you should try looking at whether your database supports regular expressions and then use that functionality instead.
If you r database is SQL 2005, then you should read this and see if this can help you
http://msdn.microsoft.com/en-us/magazine/cc163473.aspx