apoc.text.regreplace

Function

apoc.text.regreplace(text String, regex String, replacement String) - finds and replaces all matches found by 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"