I want to split a string separated by any combination of semicolon, whitespace and comma. For example:
input:"Jan,Feb;Mar Apr, May;"
output:["Jan","Feb","Mar","Apr","May"]
Because the split() method will match exactly what you specify in it, which is not what I need, I can not simply use split() method here. Can someone help me with this?
Use
re.split:The
if sfilters out empty strings.