Regular expressions are also supported in MySQL and usually have good results, and the usual regular ones are as follows:
Select * from where ' Regular Expressions ';
1. String starting with Xiaomi or ending with 06
Select * from where ' ^xiaomi|06$ ';
2. Start with Xiaomi and end with 06, with strings in the middle containing any other characters
Select * from where ' ^xiaomi.+06$ ';
Note: point "." When in a character group, the input represents a normal character point, and any character outside the group of characters ,+ " one or more"in the regular, so the above regex does not match "xiaomi06" So there are no strings of other characters in the middle .
3. Start with Xiaomi and end with 06, middle can have no character, or can have any character string
Select * from where ' ^xiaomi.*06$ ';
In regular expressions, * stands for "0 or more", so the above can match both Xiaomi06 and XiaomiHEHE06.
MySQL Regular expression