Skip to content

TRANSLATE_REGEX

SELECT
TRANSLATE_REGEX('hello 123 world', '[0-9]+') AS result
FROM dual;
"hello world"

In the above example, TRANSLATE_REGEX function is used on the string ‘hello 123 world’ by providing the pattern ‘[0-9]+’, which represents one or more digits. This function removes all matches of the provided pattern from the original string, thus resulting in ‘hello world’.