(pattern, value, flags=0)
| 798 | |
| 799 | |
| 800 | def search_pattern(pattern, value, flags=0): |
| 801 | try: |
| 802 | pattern, reflags = pattern |
| 803 | |
| 804 | except ValueError: |
| 805 | reflags = 0 |
| 806 | |
| 807 | except TypeError: |
| 808 | return None |
| 809 | |
| 810 | try: |
| 811 | return re.search(pattern, value, reflags | flags) |
| 812 | except TypeError: |
| 813 | return None |
| 814 | |
| 815 | |
| 816 | def replace_patterns(value, rules): |
no test coverage detected