Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 9955c485fa6141b0a0f91899a37a8954c115a6da
Ticket: 2798939fffffffffffffffffffffffffffffffff
Non-greedy quantifiers revert to greedy when branched
User & Date: bilgexa on 2009-05-30 21:15:37
Changes

  1. assignee changed to: "pvgoran"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    Non-greedy quantifiers revert to greedy when used in conjunction with branches (pipe character).
    
    The following branch-free expression matches each letter in the test string and therefore correctly returns 14
    regexp -all .+? {this is a test}
    
    The following branched expression matches the entire string only once because the quantifier reverts to greedy and therefore incorrectly returns 1
    regexp -all .+?|x {this is a test}
    
    This breaks a lot of complex regular expressions that require non-greedy quantifiers and branches.
    
  4. foundin changed to: "obsolete: 8.5.7"
  5. is_private changed to: "0"
  6. priority changed to: "5 Medium"
  7. resolution changed to: "None"
  8. status changed to: "Open"
  9. submitter changed to: "bilgexa"
  10. subsystem changed to: "43. Regexp"
  11. title changed to:
    Non-greedy quantifiers revert to greedy when branched
    
  12. type changed to: "Bug"