import re
strs = ['hello-world', r'hello;world ', r'he(llo)(w|o rld)', r'hello\;world',r'hello\-world ']
for s in strs:
	res = re.findall(r'''(?:\\.|[^\s"'();|&\\])+''', s)
	for val in res:
		print(val)
	print("-------------")