Tcl Source Code

Ticket Change Details
Login
Overview

Artifact ID: e45ba7a55cb9a92f7cef82d04608ff85c61fb528
Ticket: 700ac47ece488c90836eac2e459ad29e6f329b6e
Bug in regexp matching
User & Date: Hagay Garty 2014-12-27 09:17:56
Changes

  1. assignee changed to: "nobody"
  2. closer changed to: "nobody"
  3. cmimetype changed to: "text/plain"
  4. comment changed to:
    Hi, I have seen a bug in regexp matching. I verified VS external regexp engines that indeed im not mistaken.
    
    Recreation:
    
    set data {0000}
    regexp {\n?(0+?)} $data a b
    
    This will place '0000' in b variable 
    The correct result is to place '0' in b variable
    
    So in this case the '+?' is treated as '+"
    
    BTW when omitting the '\n?' from the beginning of the regexp the problem is gone and the correct assignment is made to b - '0'
    
  5. foundin changed to: "8.5.17"
  6. is_private changed to: "0"
  7. login: "Hagay Garty"
  8. priority changed to: "5 Medium"
  9. private_contact changed to: "16c28166ca941aa1315f7147d67737eb495d8ff0"
  10. resolution changed to: "None"
  11. severity changed to: "Important"
  12. status changed to: "Open"
  13. submitter changed to: "Hagay Garty"
  14. subsystem changed to: "- New Builtin Commands"
  15. title changed to: "Bug in regexp matching"
  16. type changed to: "Bug"