Results 1 to 5 of 5
  1. #1
    Join Date
    Mar 2004
    Posts
    15

    Unanswered: String search (looking for number characters)

    What is th wildcard for any digit? Tried searching online but only found the below wildcards. Is their any wildcard like "#" that is used in MS Access. Trying to find string characters that contain digits like:

    "SnapMirror[22]" would be a valid return row.


    _ (underscore) = Any single character (SQL)
    % = Any string of zero or more characters (SQL)


    Thanks everyone for your advice and comments

  2. #2
    Join Date
    Mar 2004
    Posts
    15
    btw, i'm using mysql 4.1.12a-nt

  3. #3
    Join Date
    Apr 2005
    Location
    Baltimore, MD
    Posts
    297
    ...WHERE column_name REGEXP '[0-9]*'

    http://dev.mysql.com/doc/refman/5.0/...-matching.html

  4. #4
    Join Date
    Apr 2005
    Location
    Baltimore, MD
    Posts
    297
    Whoops, that's what I get for copying straight off of the mysql site. The * operator will match 0 or more occurences, and you don't want that. So just remove the *.

    Code:
     	...WHERE column_name REGEXP '[0-9]'

  5. #5
    Join Date
    Mar 2004
    Posts
    15
    Thanks for the help!

Posting Permissions

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