replace.asciidoc 540 B

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