Results 1 to 7 of 7
  1. #1
    Join Date
    Apr 2004
    Posts
    49

    Unanswered: Regular expression..

    Does SqlServer support Regular expression?
    I want to know if it's avilable or not...
    And if it's not available, I want to know any other efficient way to validate string.. manipulating Regular expression style validation.

    Thank you all...
    MCSD .NET, SCJP, SCJWD

  2. #2
    Join Date
    Sep 2003
    Posts
    522
    use sp_oaxxx, works like a charm

  3. #3
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    Transact-SQL 2000 supports a very crude, grep like set of regular expressions for the LIKE operator. I don't know of anything like the regular expressions in Perl, awk, vi, or gres within Transact-SQL (and would often kill for such a thing!). This is coming in Yukon, but that is still a ways off.

    -PatP

  4. #4
    Join Date
    Jul 2003
    Location
    San Antonio, TX
    Posts
    3,662
    Pat, check this out, it may change your mind
    "The data in a record depends on the Key to the record, the Whole Key, and
    nothing but the Key, so help me Codd."

  5. #5
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    That example gets you about 30% of grep, which is a considerable improvement over what LIKE gives you. It doesn't get any significant part of regexp as offered by Perl, awk, gres, etc.

    I still use Perl when the going gets tough. Perl can open an ODBC connection, mangle the data, and be done before I could figure out how to identify the data that I needed to change using LIKE!

    -PatP

  6. #6
    Join Date
    Jul 2003
    Location
    San Antonio, TX
    Posts
    3,662
    No pressure, just a thought
    "The data in a record depends on the Key to the record, the Whole Key, and
    nothing but the Key, so help me Codd."

  7. #7
    Join Date
    Apr 2004
    Posts
    49
    Thank you all for considering.
    rdjabarov's link give that I really needed.
    MCSD .NET, SCJP, SCJWD

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •