(s)
| 135 | if isna(value) or not isinstance(value, str): |
| 136 | |
| 137 | def re_replacer(s): |
| 138 | if is_re(rx) and isinstance(s, str): |
| 139 | return value if rx.search(s) is not None else s |
| 140 | else: |
| 141 | return s |
| 142 | |
| 143 | else: |
| 144 | # value is guaranteed to be a string here, s can be either a string |