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/06/21 04:36:27 UTC

DO NOT REPLY [Bug 20982] New: - Incorrect processing of word boundary marker.

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