If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > RegExp Question

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-13-09, 03:07
IMAhsan IMAhsan is offline
Registered User
 
Join Date: Jul 2009
Posts: 3
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
Reply With Quote
  #2 (permalink)  
Old 07-13-09, 03:20
healdem healdem is online now
Jaded Developer
 
Join Date: Nov 2004
Location: out on a limb
Posts: 9,260
try da manuel
__________________
I'd rather be riding my Versys or my Tiger 800 let alone the Norton
Reply With Quote
  #3 (permalink)  
Old 07-13-09, 03:23
IMAhsan IMAhsan is offline
Registered User
 
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 ?
Reply With Quote
  #4 (permalink)  
Old 07-13-09, 03:26
healdem healdem is online now
Jaded Developer
 
Join Date: Nov 2004
Location: out on a limb
Posts: 9,260
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 my Versys or my Tiger 800 let alone the Norton
Reply With Quote
  #5 (permalink)  
Old 07-13-09, 03:30
IMAhsan IMAhsan is offline
Registered User
 
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.
Reply With Quote
  #6 (permalink)  
Old 07-13-09, 07:12
r937 r937 is offline
SQL Consultant
 
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 19,534
WHERE column_name REGEXP '[^a-z]'
__________________
r937.com | rudy.ca
please visit Simply SQL and buy my book
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On