Results 1 to 6 of 6

Thread: RegExp Question

  1. #1
    Join Date
    Jul 2009
    Posts
    3

    Unanswered: RegExp Question

    Deall All,
    Am a newbie to MYSql and am stuck with a problem, I want to pick all the records that contain anything else except a-z, this means that if a record contains a-z but also contains anything else like any symbol it should be included..Please Help.
    Thanks in Advance
    Regards
    Ahsan

  2. #2
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    try da manuel
    I'd rather be riding on the Tiger 800 or the Norton

  3. #3
    Join Date
    Jul 2009
    Posts
    3
    I already knew about that link but as am a new to this so was not able to grasp all of this and i also i want this query as soon as possible, any body have the idea about it ?

  4. #4
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    so what have you tried?
    have you refined your regexp.

    on the face of it the manual seems relatively self explanitory
    I'd rather be riding on the Tiger 800 or the Norton

  5. #5
    Join Date
    Jul 2009
    Posts
    3
    i tried the following query
    SELECT * FROM table_name WHERE column_name NOT REGEXP '[a-z]'

    but it shows only those records that contain anything except a-z and does not includes those records that includes a-z and any other thing.

  6. #6
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    WHERE column_name REGEXP '[^a-z]'
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

Posting Permissions

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