MySQL regular 1, or
Select * from product where name regexp 'Hello | world' or
Select * from user where name regexp '[123] tom' matches any
[123] is equivalent to 1 | 2 | 3
Select * from user where name regexp '1 | 2 | 3 tom'
2. exclusion
Select * from user where name regexp '[^ 123] tom'
3. range matching
Select * from user where name regexp '[1-3] tom'
4. Escape Special characters
Select * from user where name regexp 'Linda //. cai'
5. repeated metacharacters
* 0 or more + one or more? 0 or one
{N} matches n times {n,} matches at least n times {n, m} matches between n-m times
Select * from product where name regexp '// ([0-9] sticks? //)'
Select * from product where name regexp '[: digit:] {4 }'
6. Character classes
[: Alnum:] any letter or number
[: Alpha:] any character
[: Blank:] space and tabulation
[: Digit:] any positive integer
[: Lower:] any lowercase letter
[: Upper:] any uppercase letter
[: Space:] any blank characters (including spaces)
7. positioning operator
^ Start of text
$ End of text
[[: <:] Start of a word
[[:>:] End of a word