Advertisement
Guest User

Untitled

a guest
Oct 27th, 2016
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. # REG A
  2. TextToParse1
  3. TextToParse2
  4. ...
  5. ...
  6. ...
  7. TestToParseX
  8. # reg A
  9. # REG B
  10. TextToParse1
  11. TextToParse2
  12. ...
  13. ...
  14. ...
  15. TestToParseX
  16. # reg B
  17. (continued)
  18.  
  19. start = timer()
  20. pattern = r"(# REG {0})(.*)(# reg {0})".format(reg_name)
  21. match = re.search(pattern, file, re.DOTALL)
  22. end = timer()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement