Overview
| Artifact ID: | fef17f6d26b0b35e390d39635179d08a76283cd9 |
|---|---|
| Ticket: | 217915ffffffffffffffffffffffffffffffffff
Problems with non-greedy quantifiers |
| User & Date: | nobody on 2000-10-26 00:45:55 |
Changes
- assignee changed to: "nobody"
- cmimetype changed to: "text/plain"
- 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 - foundin changed to: "obsolete: 8.2"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- status changed to: "Open"
- submitter changed to: "nobody"
- subsystem changed to: "43. Regexp"
- title changed to: "Problems with non-greedy quantifiers"
- type changed to: "Bug"