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 20982] New: - Incorrect processing of word boundary marker.
Date Sat, 21 Jun 2003 02:36:27 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=20982>.
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=20982

Incorrect processing of word boundary marker.

           Summary: Incorrect processing of word boundary marker.
           Product: Regexp
           Version: unspecified
          Platform: PC
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Other
        AssignedTo: regexp-dev@jakarta.apache.org
        ReportedBy: grig@supportwizard.com


Module to test:
----RegExpr.java------------------------------------
import org.apache.regexp.RE;

public class RegExpr {

 public static void main(String[] args) throws Exception {

  String htmltext = " class=\"inactiveTab\" class=\"activeTab\" ";
  String[] classnames = {"activeTab","inactiveTab"};
  String prefix = "_1";


  System.out.println("Source:" + htmltext );

  for(int i=0; i<classnames.length; i++) {
 
  
   RE regexp = new RE("\\b" + classnames[i] + "\\b", RE.MATCH_CASEINDEPENDENT);

   System.out.println( "classname:" + classnames[i] + "\t- " + regexp.subst 
(htmltext, classnames[i]+prefix) );
  }
 }
}
----------------------------------------------------

Reaction:

D:\temp\JAVATEST\RegExp>java RegExpr
Source: class="inactiveTab" class="activeTab"
classname:activeTab     -  class="inactiveTab_1" class="activeTab_1"
                                        ^^^^^^^^
classname:inactiveTab   -  class="inactiveTab_1" class="activeTab"

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


Mime
View raw message