equal
deleted
inserted
replaced
504 def rematch(el, l): |
504 def rematch(el, l): |
505 try: |
505 try: |
506 # hack to deal with graphlog, which looks like bogus regexes |
506 # hack to deal with graphlog, which looks like bogus regexes |
507 if el.startswith('|'): |
507 if el.startswith('|'): |
508 el = '\\' + el |
508 el = '\\' + el |
509 return re.match(el, l) |
509 # ensure that the regex matches to the end of the string |
|
510 return re.match(el + r'\Z', l) |
510 except re.error: |
511 except re.error: |
511 # el is an invalid regex |
512 # el is an invalid regex |
512 return False |
513 return False |
513 |
514 |
514 pos = -1 |
515 pos = -1 |