apoc.text.regreplace

Details

Syntax

apoc.text.regreplace(text, regex, replacement)

Description

Finds and replaces all matches found by the given regular expression with the given replacement.

Arguments

Name

Type

Description

text

STRING

The string to be modified.

regex

STRING

The regular expression pattern to replace in the original string.

replacement

STRING

The value to be inserted in the original string.

Returns

STRING

Usage Examples

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

"Neo4j GRANDstack Neo4j GRANDstack"