MySQL Forums
Forum List  »  Newbie

Re: mysql regexp issue range
Posted by: Rick James
Date: October 13, 2010 05:59PM

WHERE dataname REGEXP 'a1-2-([3-8][0-9]|90)';
or
WHERE dataname REGEXP 'a1-2-([3-8][[:digit:]]|90)';

() is for grouping
| means OR
[3-8] means any single character between '3' and '8'
[[:digit:]] is the same as [0-9], namely a single digit character.

Options: ReplyQuote


Subject
Written By
Posted
October 12, 2010 06:06AM
October 12, 2010 06:51AM
October 12, 2010 08:12AM
October 12, 2010 09:58AM
October 12, 2010 09:15PM
October 13, 2010 01:57AM
October 13, 2010 08:25AM
October 13, 2010 09:35AM
Re: mysql regexp issue range
October 13, 2010 05:59PM
October 19, 2010 12:32AM
October 19, 2010 01:25AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.