elasticsearch/docs/reference/esql/functions/replace.asciidoc

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

18 lines
551 B
Plaintext
Raw Normal View History

[discrete]
[[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]
|===