I am trying to parse the string that has multiple delimiters that may be repeating.
The input string is:
"-abc,-def,ghi-jkl,mno"
Expected return is:
["abc", "def", "ghi", "jkl", "mno"]
I tried the belwo code:
re.split(",|-", string)
Gives the output:
['', 'abc', '', 'def', 'ghi', 'jkl', 'mno']