Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想要一个简单的正则表达式来匹配这样的数字
09876765456 or 09253647586
在 mysql 中使用这样的选择语法:
SELECT * FROM table` WHERE `number` REGEXP 'regex' LIMIT 0 , 30
这个正则表达式应该这样做:
^09\d{9}$
文本09后跟 9 位数字。^并将$匹配锚定到字符串的开头和结尾。
09
^
$
SELECT * FROM table` WHERE `number` REGEXP '^09\d{9}$' LIMIT 0 , 30