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 2005/09/21 08:16:37 UTC

DO NOT REPLY [Bug 36753] New: - method subst() on RegExp "^" should work different

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