ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gilbert Rebhan <...@schillbaer.de>
Subject Re: getting filename from dir listing
Date Sat, 22 Sep 2007 10:30:13 GMT
Mario Madunic wrote:
> Thanks Gilbert.
> 
> I ran a test of your script and received the following error.

sorry was untested, use =

<script language="ruby">
<![CDATA[ 
str=File.basename(Dir["J:/test/*.xml"].sort[0]).gsub(/(\w{8}).+/, '\1')
$project.setProperty "myproperty", str
]]>
</script>

means use '\1' instead of $1 in the gsub part
and it will work.

Regards. Gilbert

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


Mime
View raw message