fork download
  1. import re
  2.  
  3. regex = r"^process\.args=spring.*\.xml(?!\r?\nprocess\.script=true\b)"
  4.  
  5. line = ("xxxx xxx xxx xxx\n"
  6. "process.args=spring.xxxx.xml\n"
  7. "process.script=true\n"
  8. "xxxx xxx xxx xxx\n\n\n"
  9. "xx xx xxx xxx xxx\n"
  10. "xxxx xxx xxx xxx\n"
  11. "process.args=spring.xxxx.xml\n"
  12. "xxxx xxx xxx xxx")
  13.  
  14. res = re.findall(regex, line, re.MULTILINE)
  15. print(res)
Success #stdin #stdout 0.03s 9524KB
stdin
Standard input is empty
stdout
['process.args=spring.xxxx.xml']