ibis.expr.api.StringValue.re_replace¶
-
StringValue.
re_replace
(pattern, replacement)¶ Replaces match found by regex with replacement string. Replacement string can also be a regex
- Parameters
pattern (string (regular expression string)) –
replacement (string (can be regular expression string)) –
Examples
>>> import ibis >>> table = ibis.table([('strings', 'string')]) >>> result = table.strings.replace('(b+)', r'<>') # 'aaabbbaa' becomes 'aaa<bbb>aaa' # noqa: E501
- Returns
modified
- Return type
string