elasticsearch/docs/reference/esql/functions/replace.asciidoc
AlexB 2ccdae6745
Eval REPLACE function (#98909)
Co-authored-by: Alexandros Batsakis <abatsakis@splunk.com>
Co-authored-by: Andrei Stefan <andrei@elastic.co>
2023-09-29 17:41:20 +03:00

16 lines
540 B
Text

[[esql-replace]]
=== `REPLACE`
The function substitutes in the string (1st argument) any match of the regular expression (2nd argument) with the replacement string (3rd argument).
If any of the arguments are `NULL`, the result is `NULL`.
. This example replaces an occurrence of the word "World" with the word "Universe":
[source.merge.styled,esql]
----
include::{esql-specs}/docs.csv-spec[tag=replaceString]
----
[%header.monospaced.styled,format=dsv,separator=|]
|===
include::{esql-specs}/docs.csv-spec[tag=replaceString-result]
|===