I need to figure out how to apply a regular expression to a query so that the string passed in is compared, dbData LIKE (%passedInString%)
, to the string in the database, but where the stings are both devoid of hyphens.
Example of what is in the database: DR-9JPE-P-77-7733
Examples of what might be passed in that would return a match: 7777333, P77, 9JPEP-77, etc.
Is it even possible? Help me out! :) And thanks in advance!
A basic, albeit wrong version, of what I am trying to do:
WHERE REGEXP(INDATABASE) LIKE (%REGEXP(PASSEDIN)%)