Article written

  • on 20.05.2009
  • at 08:38 AM
  • by arkin

Using Regular Expressions in MySQL Queries 0

May20

Here is an example of how you would select data based on a regular expression.

SELECT phone FROM table WHERE phone REGEX '^[0-9 ]{11,14}$' = 0 LIMIT 100

The above would show all the phone numbers that are not between 11 and 14 numbers and spaces.

SELECT phone FROM table WHERE phone REGEX '^[0-9 ]{11,14}$' LIMIT 100

The above would show all the phone numbers that are between 11 and 14 numbers and spaces.

I hope this quick guide has helped.
Any questions, feel free to ask.

subscribe to comments RSS

There are no comments for this post

Please, feel free to post your own comment

* these are required fields

arkinEx Codex is powered by WordPress and FREEmium Theme.
developed by Dariusz Siedlecki and brought to you by FreebiesDock.com