Thread: Reg Ex help!
View Single Post
Old 04-06-2011, 02:23 PM  
sarettah
see you later, I'm gone
 
Industry Role:
Join Date: Oct 2002
Posts: 14,110
Quote:
Originally Posted by CS-Jay View Post
I can't believe it was that easy. Maybe I have read way to much on regex, and the brain overloaded. That is basically what I wanted to do. Just simple partial matching of names! Thank you!
No prob.

Regx stuff can get real hairy real quick imho ;p

btw, for readability sakes when I am doing that in mysql I usually use the rlike function instead of regexp (it is the same function under a different name) so the sql statement becomes something like:

select * from tablename where fieldname rlike 'regex expression'

select * from testit where name rlike 'q.*j.*' Just reads better than select * from testit where name regexp 'q.*j.*' imho.
__________________
All cookies cleared!
sarettah is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote