MySQL Regular Expressions query

A, REGEXP, 'matching mode'
II conventional matching method
Here Insert Picture Description
, for example:
the SELECT * the FROM User the WHERE username REGEXP, '^ t'
indicates that the query username which the first letter in t start
SELECT * FROM user WHERE username REGEXP ' t $' represent the query username inside t the end of the first letter in a
SELECT * FROM user WHERE username REGEXP ' [ak]' indicates that the query which contains the username letters ak

Published 70 original articles · won praise 1 · views 1300

Guess you like

Origin blog.csdn.net/DAN_L/article/details/104654933