Hi Stefan,

eight backslashes, wow! That means four intermediate steps to get from

\\\\\\\\ to \

I'll probably just go with the forward slashes in the property file
and pathconvert them to backslashes.

thanks a lot,
Jakob.



On Tue, May 11, 2010 at 17:29, Stefan Bodewig <[email protected]> wrote:
> On 2010-05-11, Jakob Fix <[email protected]> wrote:
>
>> Hi, looked through the archive, but I don't think pathconvert can be
>> used in this case.
>
>> property file:
>> prop=E:\\foo\\bar
>
> property files and backslahes are a pain.
>
>> build file:
>> <replaceregexp file="${target.dir}/foobar.xml">
>>   <regexp pattern="value=&quot;[^&quot;]+&quot;"/>
>>   <substitution expression="value=&quot;${prop}&quot;"/>
>> </replaceregexp>
>
>> I also tried double escaping i.e.
>> prop=E:\\\\foo\\\\bar
>
>> but there all backslashes disappear as well.
>
> I'm afraid you'd need eight of them.  It may be simpler to use forward
> slashes in your property file and <pathconvert> to translate them after
> you've applied the regex.
>
> Stefan
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to