Replacing Text in Strings

AMPS provides a pair of functions, REPLACE and REGEXP_REPLACE, that replace text within strings. The REPLACE function does a literal match of the string to be replaced, while REGEXP_REPLACE uses a PCRE pattern to find the string to be replaced.

The following expressions all evaluate as true:

REPLACE('fandango', 'dan', 'din') == 'fandingo'

REGEXP_REPLACE('fandango','n.*n', 'r') == 'fargo'

Last updated

Copyright 2013-2024 60East Technologies, Inc.