regex_transform

Function

ArgDescriptionType
sourceThe source string to replace.string (required)
mapA dict with keys reg, values substitutions.ordereddict.Dict (required)
keyA key for cachingstring

Description

Search and replace a string with multiple regex. Note you can use $1 to replace the capture string.

SELECT regex_transform(source="Hello world", map=dict(
   `^Hello`="Goodbye",
   `world`="Space"), key="A")
FROM scope()
comments powered by Disqus