I want to split strings using a comma delimiter if the comma is preceded by a certain regex. Consider the case where my strings are in the format: \"(bunch of stuff that mig
You can use a positive look-behind if the FOO_REGEX is fixed-width. Here, you will get your line split after "$$asdf,"
See a sample working program:
import re
str = 'hi, hello! $$asdf, I am foo, bar $$jkl, cool'
splts = re.split('(?<=\$\$asdf), *', str)
print splts
Output:
['hi, hello! $$asdf', 'I am foo, bar $$jkl, cool']