Make an escaped string in IJ macro language
Posted by
lechristophe on
Dec 13, 2016; 11:12am
URL: http://imagej.273.s1.nabble.com/Make-an-escaped-string-in-IJ-macro-language-tp5017770.html
Hi,
I'm trying to make a properly escaped string from a non-escaped Windows
path string, i.e.
from
C:\Users\christo\161212(test ABL b2s)\Locs\
to
C:\\Users\\christo\\161212(test ABL b2s)\\Locs\\
however both
replace(path, "\\", "\\\\")
and
replace(path, "\\", File.separator+File.separator)
throw a regex error.
How should I devise the replacement string "\\" to be handled by the
"replace" macro function?
Thanks,
Christophe
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html