jakarta-regexp-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 4057] - \w does not match underscore
Date Thu, 15 Nov 2001 08:37:25 GMT
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=4057>.
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=4057

\w does not match underscore

bob_dickinson@hotmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|\w does not match underscore|\w does not match underscore



------- Additional Comments From bob_dickinson@hotmail.com  2001-11-15 00:37 -------
I also observed this problem.  I noticed something else: if I wrap the \w in a 
character class by itself (i.e. [\w]) then it does match underscores.  I wrote 
a test app to verify the observed behavior.  The output is provided below:

"\w+" matched target: "a" - matching part was "a" 
"\w+" did not match target: "_"
"[\w]+" matched target: "_" - matching part was "_" 
"^\w+$" did not match target: "under_score" 
"^[\w]+$" matched target: "under_score" - matching part was "under_score" 
"^[\w]+$" did not match target: "under#_score"

--
To unsubscribe, e-mail:   <mailto:regexp-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:regexp-dev-help@jakarta.apache.org>


Mime
View raw message