jakarta-regexp-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 986] - Leading "\b" word boundary is ignored
Date Tue, 26 Jun 2001 17:29:15 GMT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=986

*** shadow/986	Sun May 20 17:23:18 2001
--- shadow/986.tmp.2976	Tue Jun 26 10:29:15 2001
***************
*** 1,19 ****
! Bug#: 986
! Product: Regexp
! Version: unspecified
! Platform: Other
! OS/Version: Other
! Status: NEW   
! Resolution: 
! Severity: Normal
! Priority: Medium
! Component: Other
! AssignedTo: regexp-dev@jakarta.apache.org                            
! ReportedBy: echid@textwise.com               
! URL: 
! Cc: 
! Summary: Leading "\b" word boundary is ignored
! 
  Using regexp Version 1.2 on either Solaris 2.6 or WinNT 4 and versions 1.1.7 
  and 1.3 of Sun's JRE.
  
--- 1,19 ----
! +============================================================================+
! | Leading "\b" word boundary is ignored                                      |
! +----------------------------------------------------------------------------+
! |        Bug #: 986                         Product: Regexp                  |
! |       Status: NEW                         Version: unspecified             |
! |   Resolution:                            Platform: Other                   |
! |     Severity: Normal                   OS/Version: Other                   |
! |     Priority: Medium                    Component: Other                   |
! +----------------------------------------------------------------------------+
! |  Assigned To: regexp-dev@jakarta.apache.org                                |
! |  Reported By: echid@textwise.com                                           |
! |      CC list: Cc:                                                          |
! +----------------------------------------------------------------------------+
! |          URL:                                                              |
! +============================================================================+
! |                              DESCRIPTION                                   |
  Using regexp Version 1.2 on either Solaris 2.6 or WinNT 4 and versions 1.1.7 
  and 1.3 of Sun's JRE.
  
***************
*** 22,24 ****
--- 22,38 ----
  For example, If I make an RE object from the String "\\bfly\\b" (==> /\bfly\b/ )
  that object will correctly fail to match the string "flying" but
  will incorrectly match the string "housefly"
+ 
+ ------- Additional Comments From mdecorte@yahoo.com  2001-06-26 10:29 -------
+ If I understand the code correctly (big if), the following should fix this 
+ problem:
+ 
+ change RE.java line 1050 from
+ 
+     char cLast = ((idx == getParenStart(0)) ? '\n' : search.charAt(idx - 1));
+ 
+ to
+ 
+     char cLast = ((idx == 0) ? '\n' : search.charAt(idx - 1));
+ 
+ 

Mime
View raw message