Skip to content
Tcl Source Code History Of Ticket fe4fca32d
Login

History Of Ticket fe4fca32d

Artifacts Associated With Ticket fe4fca32d

  1. Ticket change [3b22e98da4] (rid 141456) by glennj on 2015-03-24 14:55:43:

    1. assignee initialized to: "nobody"
    2. closer initialized to: "nobody"
    3. cmimetype initialized to: "text/plain"
    4. comment initialized to:
      Currently, the MATCHING section of the re_syntax man page talks about "preferences", and states:
      
      > A branch has the same preference as the first quantified atom in it which has a preference.
      
      I don't this this is sufficiently clear to illustrate the differences between
      
          $ perl -e 'if ("1234" =~ /(\d+?)(\d+)/) {print "$& $1 $2\n"}'
          1234 1 234
          $ echo 'puts [regexp -inline {(\d+?)(\d+)} "1234"]' | tclsh
          12 1 2
      
      Can we have an explicit statement? Something like:
      
      > If the first quantifier in a branch of a RE is non-greedy, /all/ quantifiers in the branch will be considered as non-greedy.
      
      However, I just noticed something I can't explain: what's the difference between these?
      
          $ echo 'puts [regexp -inline {(?:(\d+?)(\d+))} "1234"]' | tclsh
          12 1 2
          $ echo 'puts [regexp -inline {s+?|(?:(\d+?)(\d+))} "1234"]' | tclsh
          1234 1 234
      
    5. foundin initialized to: "8.6"
    6. is_private initialized to: "0"
    7. login: "glennj"
    8. priority initialized to: "5 Medium"
    9. private_contact initialized to: "d3087a52abea86234116c6d0fc932ab13864ef48"
    10. resolution initialized to: "None"
    11. severity initialized to: "Minor"
    12. status initialized to: "Open"
    13. submitter initialized to: "glennj"
    14. subsystem initialized to: "- New Builtin Commands"
    15. title initialized to:
      mixed-greediness regular expressions need better documentation
      
    16. type initialized to: "Bug"
  2. Ticket change [c30cd066c6] (rid 257598) by serhiy.storchaka on 2026-10-11 10:49:37:

    1. 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.
      
    2. login: "serhiy.storchaka"
    3. mimetype: "text/x-fossil-wiki"
  3. Ticket change [9564d24721] (rid 261312) by dkf on 2026-11-08 20:52:56:

    1. login: "dkf"
    2. mimetype: "text/plain"
    3. subsystem changed to: "43. Regexp"
  4. Ticket change [0437bd3e6e] (rid 261369) by oehhar on 2026-11-10 16:40:29:

    1. icomment:
      Serhiy proposed to merge this with ticket [524b35a8b5].
      
    2. login: "oehhar"
    3. mimetype: "text/x-fossil-wiki"
    4. username: "oehhar"