CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Jun 2009
    Posts
    6

    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

  2. #2
    Join Date
    Jun 2004
    Location
    Kashmir, India
    Posts
    6,808

    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
  •  





Click Here to Expand Forum to Full Width

Featured