Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: dce24c22cdd1ed7825eaaa535cd6fd5c778630ae
Ticket: 1835348fffffffffffffffffffffffffffffffff
Regex "^" doesn't match start of text when -start is used
User & Date: duquette on 2007-11-20 19:35:15
Changes

  1. assignee changed to: "pvgoran"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    Tcl versions: 8.4.16, 8.5b1.
    macosx 10.4.9
    
    Normally, "^" matches the start of input:
    
      % regexp -line -start 0 {^foo} "foo"
      1
    
    When -line is specified, "^" matches the beginning of a line in
    the middle of the input:
    
      % regexp -line -start 0 {^foo} "\nfoo"
      1
    
    When -start is used, "^" will not match the text at the -start
    location:
     
      % regexp -line -start 1 {^foo} "\nfoo"
      0
    
    However, "\A" will match there just fine:
    
      % regexp -line -start 1 {\Afoo} "\nfoo"
      1
    
    I think the third case is a bug; all four of these examples should match.
    
  4. foundin changed to: "obsolete: 8.5b3"
  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: "duquette"
  10. subsystem changed to: "43. Regexp"
  11. title changed to:
    Regex "^" doesn't match start of text when -start is used
    
  12. type changed to: "Bug"