Skip to content
Advertisement

Python Regex: multiple regrex causing problem

A basic version of this problem is using an regex to translate something like abc like '%FFddsdE%' into LOWER(abc) like '%ffddsde%'
and the following code works well

JavaScript

However, everything crash down if we want to expand this problem a little bit, to both like and not like

JavaScript

It gives LOWER(not) in the output.

I am using python 3 btw. Thanks for any help!

Advertisement

Answer

You could use another group to match like and not like at the same time.

JavaScript
User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement