fork download
  1. import re
  2. from pprint import pprint
  3. pattern = r"^[ \t]{2,}([^\s.;]+(?:\s+[^\s.;]+)+[.;])"
  4.  
  5. s = ("1. A method, comprising:\n\n"
  6. " storing a first data related to an operation style of a transport in a first area;\n\n"
  7. " storing a second data related to an operation style of the transport in a second area; wherein the first and second data is based on a combined energy consumption efficiency as the transport maneuvers through the first and second area; and \n\n"
  8. " modifying functionality of the transport based on the combined energy consumption efficiency.\n\n"
  9. "2. The method of claim 1, comprising modifying functionality of the transport to operate at a greatest combined efficiency consumption efficiency while in compliance with one or more of social necessities and vehicular laws. \n\n"
  10. "And here is the text that is actually read in from my function:\n\n"
  11. "> 1. A method, comprising: storing a first data related to an operation style of a transport in a first area; storing a second data related to an operation style of the transport in a second area; wherein the first and second data is based on a combined energy consumption efficiency as the transport maneuvers through the first and second area; and modifying functionality of the transport based on the combined energy consumption efficiency.2. The method of claim 1, comprising modifying functionality of the transport to operate at a greatest combined efficiency consumption efficiency while in compliance with one or more of social necessities and vehicular laws.\n")
  12.  
  13. result = re.findall(pattern, s, re.MULTILINE)
  14. pprint(result, width=100)
  15.  
Success #stdin #stdout 0.03s 9636KB
stdin
Standard input is empty
stdout
['storing a first data related to an operation style of a transport in a first area;',
 'storing a second data related to an operation style of the transport in a second area;',
 'modifying functionality of the transport based on the combined energy consumption efficiency.']