|
-
June 25th, 2009, 11:32 AM
#1
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
-
June 25th, 2009, 02:46 PM
#2
Re: parsing regular expressions
Welcome to the forum 
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|