summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-09-30 11:50:52 -0300
committerGabriel Schneider <[email protected]>2026-10-01 00:12:17 -0300
commit7c329baddb0d45ce7937cf29941dde861f9ea27f (patch)
tree76919df40dbaccf6cd148dcbf2f46efc508df76c /docs
parentfc8e1abf361ab2151109e68e5c88a0ed45650b38 (diff)
downloadpardes-7c329baddb0d45ce7937cf29941dde861f9ea27f.tar.gz
pardes-7c329baddb0d45ce7937cf29941dde861f9ea27f.zip
A pattern anchoring some alternatives with ^ and not others is refused with why, not a bare bad regular expression
`^def|x` and `foo$|^zèbre` were refused with a bare "bad regular expression", the same words as a syntax error, so a script could not tell what to change. They now say "an alternation anchors every branch with ^ or none (^a|^b, not ^a|b)", through addr and Edit alike. fs.md states the rule and that a `$` does not count toward it (`foo$|bar` is fine). Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'docs')
-rw-r--r--docs/fs.md5
1 files changed, 3 insertions, 2 deletions
diff --git a/docs/fs.md b/docs/fs.md
index 2a618173..58ba0539 100644
--- a/docs/fs.md
+++ b/docs/fs.md
@@ -459,8 +459,9 @@ The same code (`src/regexp.zig`) serves addresses, Edit, and normal mode's
submatches, so Edit's `s` has no `\1`-`\9`.
- A pattern holding `\n` runs over the whole text: there `^` may only come
first and `$` only just before a `\n`, else it is refused.
-- An alternation must anchor every branch or none (`^def|^ ` works,
- `^def|x` is refused).
+- An alternation must anchor every branch with `^` or none (`^def|^ `
+ works, `^def|x` is refused: `an alternation anchors every branch with ^
+ or none`). A `$` does not count: `foo$|bar` is fine.
- A class may hold non-ASCII runes (`[éa-z]`, a range up to 256 runes); a
wider range or a negated class with one (`[^é]`) is refused.
- At most 512 operations (about 512 characters, counted after that