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 36405] New: - Referencing an optional backreference returns null
Date Mon, 29 Aug 2005 04:18:26 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=36405>.
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=36405

           Summary: Referencing an optional backreference returns null
           Product: Regexp
           Version: unspecified
          Platform: Other
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Other
        AssignedTo: regexp-dev@jakarta.apache.org
        ReportedBy: peterox2pub-bz@yahoo.com


In version 1.4, searching for 

(^.*JAVA_OPTS=.*-Dprogram.name.*?)(\")?$

and replacing with 

$1 -Dap.home=c:/dir$2

Will return a string with 'null' on the end if the optional " character is not
matched.

So the line

set JAVA_OPTS=%JAVA_OPTS% -Dprogram.name=%PROGNAME%

will incorrectly become 

set JAVA_OPTS=%JAVA_OPTS% -Dprogram.name=%PROGNAME% -Dap.home=c:/dirnull

But 

set JAVA_OPTS="%JAVA_OPTS% -Dprogram.name=%PROGNAME%"

will correctly become

set JAVA_OPTS="%JAVA_OPTS% -Dprogram.name=%PROGNAME% -Dap.home=c:/dir"

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