1
0

replace.asciidoc 551 B

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