Regex MySQL, Find string with at least 2 letters and 2 numbers -


i'm using regular expression regexp '^([a-z]){2,}([0-9]){2,}$' find strings more 2 letters , more 2 numbers in combination regexp '^([0-9]){2,}([a-z]){2,}$'. covers strings starting numbers or ending numbers.

i need 1 regex find numbers in between letters also.

mysql version 5.1.73

assuming want test column val try following:

... (val regexp '^[0-9a-z]*$')      +(val regexp '[a-z].*[a-z]')      +(val regexp '[0-9].*[0-9]')=3 

this combination test val made of only numbers , characters (first regexp), contain at least 2 letters' (second regexp) , at least 2 numbers (third regexp).


Comments

Popular posts from this blog

javascript - How to get current YouTube IDs via iMacros? -

c# - Maintaining a program folder in program files out of date? -

emulation - Android map show my location didn't work -