I have a database table with a column where every entry is a regular expression. For example, the rows in my table look like this:
table: email_address_templates email_address: /*.google.com/ email_address: /*.reddit.com/ email_address: /*.ac.uk/
I want to be able to search through this table, and find if a particular string matches one of the regular expressions.
In ruby, it would look like this:
EmailAddressTemplate.all.select do |ea|
ea.match "[email protected]"
end
I am wondering if there is a way to do a similar thing in pure mysql.