Bug 2122 - problem with character class sub-parser
Summary: problem with character class sub-parser
Status: CLOSED DUPLICATE of bug 2121
Alias: None
Product: Regexp
Classification: Unclassified
Component: Other (show other bugs)
Version: unspecified
Hardware: Other other
: P3 normal (vote)
Target Milestone: ---
Assignee: Jakarta Notifications Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-06-11 16:42 UTC by lmoore
Modified: 2004-11-16 19:05 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description lmoore 2001-06-11 16:42:58 UTC
version 1.2

using character expressions such as [ac-z] or [ace-z] seem to lead to
broken regexps.  the following two tests for RETest should show the
problem:
#149
[ac-z]+
ace
YES
ace

#150
[ace-z]+
ace
YES
ace

the results that i get are:
149. [ac-z]+

   Match against: 'ace'
   Match: YES
   Paren count: 1
   Paren 0 : ce


*******************************************************
*********************  FAILURE!  **********************
*******************************************************


Register 0 should be = "ace", but is "ce" instead.

150. [ace-z]+

   Match against: 'ace'
   Match: YES
   Paren count: 1
   Paren 0 : a


*******************************************************
*********************  FAILURE!  **********************
*******************************************************


Register 0 should be = "ace", but is "a" instead.

it would seem that the range is somehow invalidating the previous simple
character.

on a related note, the only way to match '-' in a character class is to 
escape it and add it at the end.  that seems wrong.
Comment 1 Michael McCallum 2001-09-08 15:50:04 UTC

*** This bug has been marked as a duplicate of 2121 ***
Comment 2 Vadim Gritsenko 2003-05-02 01:27:40 UTC
Fixed. See Bug #19329