Regex expressions (“illegal escape character”) -
i using regular expressions finds strings
"override="/var/logs/test/" or "override="/var/logs/sample/" in .xml file.
i have final string
pattern:
public final static string regex_logpath="override=\"\/var\/logs\/([^\"]*)\/";
it works fine (i build successful (total time: 0 seconds) while running project in netbeans ide), strings found. when attemp compile code .jar file, error msg:
error: illegal
escape character
public final static string regex_logpath="override=\"\/var\/logs\/([^\"]*)\/";
compile failed; see compiler error output details. build failed (total time: 0 seconds)
you don't have escape forwards slashes, not special (escape-able) characters.
Comments
Post a Comment