test_user_regex.py 392 B

1234567891011121314
  1. import re
  2. pattern = r'\$F' + r'ormat:[^$]+\$'
  3. content = """
  4. if "$Format:LocalFoodAI:app.py:" in line:
  5. match = re.search(r'\\$Format:LocalFoodAI_lanfr144:test_user_regex.py:%an:%ae:%ad:%cn:%ce:%cd:%H:%D:%N$', line)
  6. """
  7. match = re.search(pattern, content)
  8. if match:
  9. print("MATCHED BLOCK:")
  10. print(match.group(0))
  11. else:
  12. print("NO MATCH")