fork download
  1. import re
  2.  
  3. regex = r"\([0-9]\)\s+([^.!?]+[.!?])"
  4. test_str = "(1) This is my first sentence, it has to be captured. This is my second sentence."
  5.  
  6. print(re.findall(regex, test_str))
Success #stdin #stdout 0.03s 9516KB
stdin
Standard input is empty
stdout
['This is my first sentence, it has to be captured.']