I have the following code that works in Python 2.7:
entry_regex = '(' + search_string + ')'
entry_split = re.split(entry_regex, row, 1, re.IGNORECASE)
I need to make it work in Python 2.6 as well as in Python 2.7 and 2.6 re.split doesn’t accept a flag (re.IGNORECASE) as forth parameter. Any help? Thanks
You can just add (?i) to the regular expression to make it case insensitive: