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 2003/08/27 16:03:05 UTC
DO NOT REPLY [Bug 21706] -
Escaping '.' character does not work in some conditions
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21706>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21706
Escaping '.' character does not work in some conditions
vgritsenko@apache.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |INVALID
------- Additional Comments From vgritsenko@apache.org 2003-08-27 14:03 -------
Tried with CVS 20030827 (today), got:
[1] Checking "john.doe@somehost.net" against
"^(.*<)?([a-zA-Z0-9_"."\-])+@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+(>)?$"
: true
[2] Checking "john-doe@somehost.net" against
"^(.*<)?([a-zA-Z0-9_"."\-])+@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+(>)?$"
: true
[3] Checking "john_doe@somehost.net" against
"^(.*<)?([a-zA-Z0-9_"."\-])+@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+(>)?$"
: true
[4] Checking "johndoe@somehost.net" against
"^(.*<)?([a-zA-Z0-9_"."\-])+@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+(>)?$"
: true
[5] Checking "john.doe@somehost.net" against
"^(.*<)?([a-zA-Z0-9_\.\-])+@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+(>)?$"
: true
[6] Checking "john-doe@somehost.net" against
"^(.*<)?([a-zA-Z0-9_\.\-])+@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+(>)?$"
: true
[7] Checking "john_doe@somehost.net" against
"^(.*<)?([a-zA-Z0-9_\.\-])+@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+(>)?$"
: true
[8] Checking "johndoe@somehost.net" against
"^(.*<)?([a-zA-Z0-9_\.\-])+@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+(>)?$"
: true
So I think it's working ok.
Note about [a-zA-Z0-9_"."\-] character class: it is the same as
[a-zA-Z0-9_".\-], and it will match " character and I guess that was not
desired. And, class [a-zA-Z0-9_\.\-] is same as [a-zA-Z0-9_.\-]. You can verify
this by downloading latest CVS and modifying your program accordingly (run it
against "j\"o\"hn.doe@somehost.net", "joh\\n-doe@somehost.net")