Refactored like/ilike to use a helper function to convert sql pattern in...

...to a regex string