0

I have the following SQL statement:

# WHERE
field LIKE '%ig%' AND field LIKE '%ru%'

What would be the correct way to translate this to a regex? My thought was because the ordering (in sql) doesn't matter, it'd each AND-ed %term% would translate to a positive lookahead:

(?=.*ig)(?=.*ru).+

Is there a better approach to this or is that normally how the above is translated?

samuelbrody1249
  • 4,379
  • 1
  • 15
  • 58

0 Answers0