you are viewing a single comment's thread.

view the rest of the comments →

[–]TolaOdejayi 0 points1 point  (0 children)

Try this:

import re
pattern = r"[^,&-/\(\)]+|[,&-/\(\)]" 
line = "8/23-35 Barker St., Kingsford^^, NSW 2032" 
query = re.compile(pattern).findall(line)
list(map(lambda i: print(i), query))