ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Weintraub" <qazw...@gmail.com>
Subject Re: How to escape characters in regexp strings?
Date Fri, 17 Aug 2007 22:21:24 GMT
Use &quot; to replace double quotation marks in Ant strings.

On 8/17/07, Krzysztof Kucybała <kkucybala@echo.fr> wrote:
> Hi,
>
> I have a problem. I'm trying to have ant substitute something in a few
> files. Here's the sample:
>
> <
> replaceregexp
> file="${artifactsdir}/${label}/${env}/src/include/configuration_wassup.php"
> match='define("WS_WASSUPHOST" *, *".*");'
> replace='define("WS_WASSUPHOST", "${dev.bck.mmc.ws_wassuphost}");'
> />
>
> This does not give me any errors, but it doesn't do anything. When I
> tried the same with " instead of ' in the match and replace attributes,
> obviously I'd need to escape other occurrences of " in the text. How do
> I do that? \" doesn't work :o( I will appreciate any help.
>
> Best regards,
> Krzysztof Kucybała
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>


-- 
--
David Weintraub
qazwart@gmail.com
Mime
View raw message