Atlantiraptor Docs

regex_transform

Type: Function · Category: popular

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()
Argument Type Description
source string (required) The source string to replace.
map ordereddict.Dict (required) A dict with keys reg, values substitutions.
key string A key for caching

Platforms: macOS, Linux, Windows