ibis.expr.api.StringValue.re_replace¶
-
StringValue.
re_replace
(arg, 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)
Returns: modified : string
Examples
>>> import ibis >>> table = ibis.table([('strings', 'string')]) >>> result = table.strings.replace('(b+)', r'<>') # 'aaabbbaa' becomes 'aaa<bbb>aaa' # noqa: E501