Skip to content
Tcl Source Code View Ticket
Login

View Ticket

"regexp {.*?} foo" should give error: couldn't compile regul

Closed / Fixed218012ffffffffffffffffffffffffffffffffffCreated 26 years agoUpdated 26 years ago
Descriptionplain2000-10-26 00:52:06
OriginalBugID: 890 Bug
Version: 8.1a2
SubmitDate: '1998-12-02'
LastModified: '1998-12-03'
Severity: MED
Status: Closed
Submitter: admin
ChangedBy: stanton
OS: All
OSVersion: NA
Machine: NA
FixedDate: '2000-10-25'
FixedInVersion: NA
ClosedDate: '1998-12-03'


> tclsh8.0
% regexp {.*?} foo
couldn't compile regular expression pattern: nested *?+

> tclsh8.1
% regexp {.*?} foo
1

I think it's probably a bug that 8.1 regexps don't choke on the 
redundant '?'.  They do choke on redundant '*' and '+' quantifiers, so they 
probably should do the same thing for '?'.  I'll let Henry know about it.
-Scott


this is not a bug.  it is valid regexp syntax in 8.1
welch Closed ticket [218012ffff]. [History diff]2000-10-26 08:12:12
Log in (anonymous is fine) to add a comment.