Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: fef17f6d26b0b35e390d39635179d08a76283cd9
Ticket: 217915ffffffffffffffffffffffffffffffffff
Problems with non-greedy quantifiers
User & Date: nobody on 2000-10-26 00:45:55
Changes

  1. assignee changed to: "nobody"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    OriginalBugID: 2866 Bug
    Version: 8.2
    SubmitDate: '1999-09-23'
    LastModified: '2000-01-27'
    Severity: LOW
    Status: Closed
    Submitter: techsupp
    ChangedBy: hobbs
    RelatedBugIDs: 4001
    OS: Windows NT
    OSVersion: 4.0 SP5
    Machine: X86
    FixedDate: '2000-10-25'
    ClosedDate: '2000-01-27'
    
    
    Name:
    Ingemar Hansson
    
    Comments:
    Perl handles this expression as expected  :-(
    
    ReproducibleScript:
    # This regular expression should extract a piece of text from a
    HTML-coded line of text
    regexp {^<TR><TD .*?><FONT .*?>(?:<A HREF.*?>)?(.*?)<} $line match result
    
    The lines may look like this (They're very long. I'll only show the
    beginning)
    <TR><TD NOWRAP ALIGN=LEFT><FONT SIZE=1 FACE=Arial COLOR=#FF0000><A
    HREF="http://some.url">Wanted text 1</A></FO
    <TR><TD NOWRAP ALIGN=LEFT><FONT SIZE=1 FACE=Arial COLOR=#FF0000>Wanted
    text 2</FO
    <TR><TD NOWRAP ALIGN=LEFT><FONT SIZE=1 FACE=Arial>Wanted text 3</FO
    <TR><TD NOWRAP ALIGN=LEFT><FONT SIZE=1 FACE=Arial><A
    HREF="http://some.other.url">Wanted text 4</A></FO
    
    ObservedBehavior:
    regexp cannot handle the expression "(?:<A HREF.*?>)?" correctly. regexp
    returns "<TR><TD NOWRAP ALIGN=LEFT><FONT SIZE=1 FACE=Arial
    COLOR=#FF0000><" in match and nothing in result.
    
    DesiredBehavior:
    obvious
    
    
    
  4. foundin changed to: "obsolete: 8.2"
  5. priority changed to: "5 Medium"
  6. resolution changed to: "None"
  7. status changed to: "Open"
  8. submitter changed to: "nobody"
  9. subsystem changed to: "43. Regexp"
  10. title changed to: "Problems with non-greedy quantifiers"
  11. type changed to: "Bug"