Bug 36405 - Referencing an optional backreference returns null
Summary: Referencing an optional backreference returns null
Status: CLOSED FIXED
Alias: None
Product: Regexp
Classification: Unclassified
Component: Other (show other bugs)
Version: unspecified
Hardware: Other Windows XP
: P2 normal (vote)
Target Milestone: ---
Assignee: Jakarta Notifications Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-08-29 06:18 UTC by peterox2pub-bz
Modified: 2007-03-13 18:42 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description peterox2pub-bz 2005-08-29 06:18:24 UTC
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"
Comment 1 Vadim Gritsenko 2007-03-13 18:42:00 UTC
fixed in trunk