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: [EMAIL PROTECTED] ! ReportedBy: [EMAIL PROTECTED] ! 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: [EMAIL PROTECTED] | ! | Reported By: [EMAIL PROTECTED] | ! | 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 [EMAIL PROTECTED] 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)); + +