You are viewing a plain text version of this content. The canonical link for it is here.
Posted to regexp-dev@jakarta.apache.org by bu...@apache.org on 2001/06/12 01:42:59 UTC
[Bug 2122] New: - problem with character class sub-parser
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=2122
*** shadow/2122 Mon Jun 11 16:42:59 2001
--- shadow/2122.tmp.2775 Mon Jun 11 16:42:59 2001
***************
*** 0 ****
--- 1,69 ----
+ +============================================================================+
+ | problem with character class sub-parser |
+ +----------------------------------------------------------------------------+
+ | Bug #: 2122 Product: Regexp |
+ | Status: NEW Version: unspecified |
+ | Resolution: Platform: Other |
+ | Severity: Normal OS/Version: Other |
+ | Priority: Other Component: Other |
+ +----------------------------------------------------------------------------+
+ | Assigned To: regexp-dev@jakarta.apache.org |
+ | Reported By: lmoore@tump.com |
+ | CC list: Cc: |
+ +----------------------------------------------------------------------------+
+ | URL: |
+ +============================================================================+
+ | DESCRIPTION |
+ 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.
\ No newline at end of file