aboutsummaryrefslogtreecommitdiff
path: root/docs/text.md
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2024-09-03 22:59:36 -0400
committerBruce Hill <bruce@bruce-hill.com>2024-09-03 22:59:36 -0400
commit02dbcbf8b5f3b4aecec78a59eea7528e5f1f3661 (patch)
treee180a05df44a615b30966a34d18793236f1f18a3 /docs/text.md
parent850fc8fbe1a777b12170ac90460b22afc10e9ad0 (diff)
Update docs
Diffstat (limited to 'docs/text.md')
-rw-r--r--docs/text.md12
1 files changed, 6 insertions, 6 deletions
diff --git a/docs/text.md b/docs/text.md
index 9d5cc973..8131d255 100644
--- a/docs/text.md
+++ b/docs/text.md
@@ -870,20 +870,20 @@ The text with occurrences of the pattern replaced.
**Example:**
```tomo
->> "Hello world":replace("world", "there")
+>> "Hello world":replace($/world/, "there")
= "Hello there"
->> "Hello world":replace("{id}", "xxx")
+>> "Hello world":replace($/{id}/, "xxx")
= "xxx xxx"
->> "Hello world":replace("{id}", "\0")
+>> "Hello world":replace($/{id}/, "\0")
= "(Hello) (world)"
->> "Hello world":replace("{id} {id}", "just \2")
+>> "Hello world":replace($/{id} {id}/, "just \2")
= "just world"
->> "some (parenthesized (with inner parens) text) here":replace("(?)", "non-\1")
-= "some non-parenthesized (with inner parens) text here"
+>> " foo(x, fn(), y) ":replace($/foo(?)/, "baz(\1)")
+= " baz(x, fn(), y) "
```
---