Find regex pattern in the text lines of file at location. Return all match groups joined as one unicode string. Only return unique items if unique is True.
(location, pattern, unique=False)
| 583 | |
| 584 | |
| 585 | def find_pattern(location, pattern, unique=False): |
| 586 | """ |
| 587 | Find regex pattern in the text lines of file at location. |
| 588 | Return all match groups joined as one unicode string. |
| 589 | Only return unique items if unique is True. |
| 590 | """ |
| 591 | pattern = re.compile(pattern, re.UNICODE | re.IGNORECASE) |
| 592 | matches = find(location, [(None, pattern,)]) |
| 593 | if unique: |
| 594 | matches = unique_filter(matches) |
| 595 | for _key, match , _line, line_number in matches: |
| 596 | yield match, line_number |
nothing calls this directly
no test coverage detected