ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Francis GALIEGUE <...@one2team.com>
Subject Re: regexp-type <mapper> doesn't work as expected/(advertised?)
Date Mon, 12 Oct 2009 06:40:19 GMT
On Mon, Oct 12, 2009 at 08:26, Francis GALIEGUE <fge@one2team.com> wrote:
> On Mon, Oct 12, 2009 at 07:00, Stefan Bodewig <bodewig@apache.org> wrote:
>> On 2009-10-09, Francis GALIEGUE <fge@one2team.com> wrote:
>>
>>> <project name="testme" default="doit" basedir=".">
>>
>>>         <target name="check">
>>>                 <uptodate property="noneed">
>>>                         <srcfiles dir="." includes="t.xml"/>
>>>                         <mapper type="regexp" from="xml$" to="txt"/>
>>>                 </uptodate>
>>>         </target>
>>
>> means map anything that ends with "xml" to "txt" - no prefix here.
>>
>
> Err, so what? A regex isn't supposed to match its whole input!
>

Let me be more precise about that.

If I:

echo t.xml | sed 's,xml$,txt'

I get t.txt as an output. As expected.

I know that Java's .matches() method on a String is a misnomer (it
tries and matches the whole input, unlike what its name says, because
/xml$/ DOES match t.xml), but I though that ant wouldn't make this
error...

-- 

Francis Galiegue
ONE2TEAM
Ingénieur système
Mob : +33 (0) 683 877 875
Tel : +33 (0) 178 945 552
fge@one2team.com
40 avenue Raymond Poincaré
75116 Paris

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message