I want to split a Python string on certain patterns but not others. For example, I have the string
Joe, Dave, Professional, Ph.D. and Someone else
I want to split on \sand\s and ,, but not , Ph.D.
How can this be accomplished in Python regex?
You can use:
Result: