Using regular expressions
Regular expressions (REGEXP) help you search for string patterns in your data. REGEXP expands upon the patterns you can use in the LIKE operator, which we covered in Chapter 6, Querying a Single Table. LIKE allowed you to use the percent sign (%) wildcard to represent zero or more characters or the underscore (_) wildcard to represent one or more characters to match patterns on strings in the WHERE clause. Regular expressions have far more wildcard characters, thereby giving you far more options for matching patterns. The downside to regular expressions is that they can be complicated and hard to understand. Regular expressions can also reduce query performance, depending on how complex they get.
The following table ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access