SyntaxFix
Write A Post
Hire A Developer
Questions
So you want to split on spaces, and on commas and periods that aren't surrounded by numbers. This should work:
r" |(?<![0-9])[.,](?![0-9])"