Bug 37275

Summary: Archored Bracketted {} expression with bouned repeats {0,2} fails to match
Product: Regexp Reporter: David A Cohen <d.cohen>
Component: OtherAssignee: Jakarta Notifications Mailing List <notifications>
Status: CLOSED FIXED    
Severity: normal    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Linux   

Description David A Cohen 2005-10-27 18:01:14 UTC
Tried matching ^(A{1}){0,2}$ on AA - fails.    
Without anchors it matches.  Without range or with smaller range it matches.   
i.e ^(A{1}){1,2}$ or ^(A{1}){2,2}$ or ^(A{1}){2} all match AA correctly.
Comment 1 Vadim Gritsenko 2007-03-07 07:38:27 UTC
Thanks for the report. Bug is resolved in current trunk version.
Comment 2 Roman Kalyakin 2007-04-18 02:58:33 UTC
Tried it on the latest trunk, now it matches only without anchors (any of them).
With smaller range it doesn't match as well.
Comment 3 Vadim Gritsenko 2007-12-17 18:42:07 UTC
All above expressions are matching 'AA' using regexp 1.5 release.
http://jakarta.apache.org/regexp/applet.html