apoc.text.regreplace

Function APOC Core

apoc.text.regreplace(text, regex, replacement) - replace each substring of the given string that matches the given regular expression with the given replacement.

Signature

apoc.text.regreplace(text :: STRING?, regex :: STRING?, replacement :: STRING?) :: (STRING?)

Input parameters

Name Type Default

text

STRING?

null

regex

STRING?

null

replacement

STRING?

null

Usage Examples

RETURN apoc.text.regreplace("Neo4j GraphQL Neo4j GraphQL", "GraphQL", "GRANDstack") AS output;
Table 1. Results
output

"Neo4j GRANDstack Neo4j GRANDstack"