Overview
| Artifact ID: | c30cd066c6a7861d52049f6fa332649b136b1a048b67e0f2136c90fa108bf9a0 |
|---|---|
| Ticket: | fe4fca32d988f67704a9fec3372bf340c81c3cef
mixed-greediness regular expressions need better documentation |
| User & Date: | serhiy.storchaka on 2026-10-11 10:49:37 |
Changes
- icomment:
Proposed docs fix in branch [/timeline?r=doc-re-syntax-preference|doc-re-syntax-preference]. It replaces the vague NOTE in re_syntax(n) MATCHING. The new text explains that the first quantified atom (or a top-level <code>|</code>) fixes only the length of the whole match, and that each quantifier keeps its own preference within that match. It covers your <code>s+?|(?:(\d+?)(\d+))</code> example, notes that this differs from Perl, Python and other engines, and shows how to work around it.
- login: "serhiy.storchaka"
- mimetype: "text/x-fossil-wiki"