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 36753] New: - method subst() on RegExp "^" should work different
Date Wed, 21 Sep 2005 06:16:37 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=36753>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=36753

           Summary: method subst() on RegExp "^" should work different
           Product: Regexp
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P5
         Component: Other
        AssignedTo: regexp-dev@jakarta.apache.org
        ReportedBy: pvojtechovsk@seznam.cz
                CC: pvojtechovsk@seznam.cz


code:

RE loRE = new RE("^");
String loResult = loRE.subst("abc", "x");

returns loResult=="xbc" //replaces first character
but I would expect it should return loResult=="xabc" //inserts before first 
character.

I agree that it is probably not defined by RE specification, but it seems to 
me similar to another case:

RE loRE = new RE("$");
String loResult = loRE.subst("abc", "x");

which returns (as I would expect) loResult=="abcx"

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
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