Regex, or Regular Expressions, is a sequence of characters, used to search and locate specific sequences of characters that match a pattern.
In SQL if you were looking for email addresses from the same company Regex lets you define a pattern using comparators and Metacharacters, in this case using ~* and % to help define the pattern:
2. Run the following query to generate the GRANT statements for your restricted user. Replace ‘mydatabase,’ ‘myuser,’ and ‘myhost’ with specific information for your database.
Note that the quotations surrounding myuser and mypassword are two single quotes, not double. The characters surrounding myhost and ,TABLE_NAME, are backticks (the key is located under the escape key on your keyboard).