mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-06-29 09:54:06 -04:00
Co-authored-by: Alexandros Batsakis <abatsakis@splunk.com> Co-authored-by: Andrei Stefan <andrei@elastic.co>
16 lines
540 B
Text
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]
|
|
|===
|