I have a form handling component I'm working on where I want to set up a SELECT statement that will take, in its WHERE clause, a line of text entered from a form and check it against a table with records of regular expressions. The regular expression contains a stub of the particular text. Here's a pseudocode of what I'm trying to do:
set variable.text = "I like foxes and wolves."
SELECT myRecord FROM myTable
WHERE regexField is a match for variable.text
The entry in regexField I'm trying to match variable.text to is "I like [a-z]{1-5} and wolves." Thus, the above would return a record in the query object, but a text entry of "I like giraffes and wolves." would not. I can think of any number of ways to use a regular expression to look for strings in a record, or of using substrings to look for a string in a record, but I'm drawing a blank on how to see if a string being used in the WHERE clause of a SELECT statement can be checked against a regular expression in a database record.