I have a string:
\"\"\"Hello. It\'s good to meet you.
My name is Bob.\"\"\"
I\'m trying to find the best way to split this into a list divi
You can use this split
re.split(r"(?<!^)\s*[.\n]+\s*(?!$)", s)
You don't need regex.
>>> txt = """Hello. It's good to meet you.
... My name is Bob."""
>>> txt.split('.')
['Hello', " It's good to meet you", '\nMy name is Bob', '']
>>> [x for x in map(str.strip, txt.split('.')) if x]
['Hello', "It's good to meet you", 'My name is Bob']
>>> s = """Hello. It's good to meet you.
... My name is Bob."""
>>> import re
>>> p = re.compile(r'[^\s\.][^\.\n]+')
>>> p.findall(s)
['Hello', "It's good to meet you", 'My name is Bob']
>>> s = "Hello. #It's good to meet you # .'"
>>> p.findall(s)
['Hello', "#It's good to meet you # "]
For your example, it would suffice to split on dots, optionally followed by whitespace (and to ignore empty results):
>>> s = """Hello. It's good to meet you.
... My name is Bob."""
>>> import re
>>> re.split(r"\.\s*", s)
['Hello', "It's good to meet you", 'My name is Bob', '']
In real life, you'd have to handle Mr. Orange, Dr. Greene and George W. Bush, though...
Mine:
re.findall('(?=\S)[^.\n]+(?<=\S)',su)