Bug 16214 - Character escaping does not always work correctly in RegExp 1.2
Summary: Character escaping does not always work correctly in RegExp 1.2
Status: CLOSED DUPLICATE of bug 14954
Alias: None
Product: Regexp
Classification: Unclassified
Component: Other (show other bugs)
Version: unspecified
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---
Assignee: Jakarta Notifications Mailing List
Depends on:
Reported: 2003-01-17 16:30 UTC by Peter Nielsen
Modified: 2004-11-16 19:05 UTC (History)
0 users


Note You need to log in before you can comment on or make changes to this bug.
Description Peter Nielsen 2003-01-17 16:30:16 UTC
When matching the string "peter+n@bmtmicro.com", the following regular 
expression fails with RegExp 1.2. (It works fine in Javascript).


These two expressions that do the same thing, work fine though:



The code used for matching is as follows:

org.apache.regexp.RE re = new org.apache.regexp.RE (expression);
boolean result = re.match ("peter+n@bmtmicro.com");

where expression is one of the three regular expressions above.

All three expressions should return the result "true", but the first one 
returns "false" in RegExp 1.2. 

Please note: I am no specialist on regular expression syntax. However, to my 
best knowledge, these expressions should all return the same result. This has 
been verified by using JavaScript which has regex support. In JavaScript all 
three expressions evaluate true.

Peter Nielsen
BMT Micro, Inc.
Comment 1 Vadim Gritsenko 2003-04-25 13:26:45 UTC

*** This bug has been marked as a duplicate of 14954 ***
Comment 2 Vadim Gritsenko 2003-05-02 01:14:36 UTC
Fixed by Bug #19329