Return-Path: Delivered-To: apmail-ant-user-archive@www.apache.org Received: (qmail 76436 invoked from network); 27 Nov 2007 18:01:00 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 27 Nov 2007 18:01:00 -0000 Received: (qmail 32805 invoked by uid 500); 27 Nov 2007 18:00:36 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 32773 invoked by uid 500); 27 Nov 2007 18:00:36 -0000 Mailing-List: contact user-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Ant Users List" Reply-To: "Ant Users List" Delivered-To: mailing list user@ant.apache.org Received: (qmail 32757 invoked by uid 99); 27 Nov 2007 18:00:36 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 27 Nov 2007 10:00:36 -0800 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of qazwart@gmail.com designates 64.233.182.185 as permitted sender) Received: from [64.233.182.185] (HELO nf-out-0910.google.com) (64.233.182.185) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 27 Nov 2007 18:00:17 +0000 Received: by nf-out-0910.google.com with SMTP id d21so1214913nfb for ; Tue, 27 Nov 2007 10:00:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; bh=4RyVXa+qRhjUKhcLK+taifJNXP4DN0Xjej9xtDjwlzs=; b=koEhNA5rzICG5L6h//1bC3pleBrvIHQfL464GqdjYCbjICIl/sLVuUVTc4o37X29+GT8WjrSweqGIGJ7I5QAcr99oCJTUlTHAiujLKKGqrKCjknqxde4qHAhjUa44ZSRQXSnSLu7eCSkJn4CNJ7CbUTLWwQvXuapBz0UERF2vK0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=ksBS1ZBHFiZAZKad6SWgKuWx1b3DDSk2F6eN2T2LYjiBHNnQUIHicXEnTo2ChXgl1sGZWKb1T2HxAPSnb8eFMPcRyytEVJSg4VP1natRknQeAI0hAK1KJ5S6qbU3rCG+LlHWTCK6oWuqXykQh4m4CsAJkY02g8ObELnd/1euy7o= Received: by 10.82.107.15 with SMTP id f15mr11028194buc.1196186418362; Tue, 27 Nov 2007 10:00:18 -0800 (PST) Received: by 10.82.100.20 with HTTP; Tue, 27 Nov 2007 10:00:18 -0800 (PST) Message-ID: Date: Tue, 27 Nov 2007 13:00:18 -0500 From: "David Weintraub" To: "Ant Users List" Subject: Re: Search and replace in property In-Reply-To: <474C1396.1000303@etf.bg.ac.yu> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_3774_12487230.1196186418383" References: <474C1396.1000303@etf.bg.ac.yu> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_3774_12487230.1196186418383 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Are you actually doing something with the properties before doing the replace? If not, you could use a filter. Unfortunately, doesn't support the filter directly, but you could copy the property file, then use the to point to your copy: Remember that you cannot change a property once it is set! If you do need to change properties look at the AntContrib task. On Nov 27, 2007 7:54 AM, Ognjen Blagojevic wrote: > Hi all, > > I need tho read the properties from the file, and then to do a string > replacement in their values. > > Something like this: > > 1. read_properties > 2. do_something_with_properties > 3. replace_in_property('&', '&') > 4. do_someting_else_with_escaped_properties > > How can I do the step 3? > > > The only solution I came up with is to use ReplaceRegExp task, and write > escaped properties to another file, and then, reread them. Is there > anything smarter than that? Something that avoids creation of another > file? > > Regards, > Ognjen > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscribe@ant.apache.org > For additional commands, e-mail: user-help@ant.apache.org > > -- -- David Weintraub qazwart@gmail.com ------=_Part_3774_12487230.1196186418383--