Match my format to the string exactly. Return a Result or Match instance or None if there's no match.
(self, string, evaluate_result=True)
| 495 | return self._format |
| 496 | |
| 497 | def parse(self, string, evaluate_result=True): |
| 498 | """Match my format to the string exactly. |
| 499 | |
| 500 | Return a Result or Match instance or None if there's no match. |
| 501 | """ |
| 502 | m = self._match_re.match(string) |
| 503 | if m is None: |
| 504 | return None |
| 505 | |
| 506 | if evaluate_result: |
| 507 | return self.evaluate_result(m) |
| 508 | else: |
| 509 | return Match(self, m) |
| 510 | |
| 511 | def search(self, string, pos=0, endpos=None, evaluate_result=True): |
| 512 | """Search the string for my format. |