import re
texts = ['Hello there,\nSPLIT\nhow are you?', 'Hello there, SPLIT how are you?',
'Hello there,\nSPLIT', 'Hello there,\nSPLIT how are you?']
for text in texts:
	print(re.split(r'\n?^SPLIT$\n?', text, flags=re.M))
	
for text in texts:
	print(re.split(r'(?:^|\n)SPLIT(?:$|\n)', text))