ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "momo momo" <molbia...@hotmail.com>
Subject replacing commented text
Date Tue, 16 Dec 2003 15:57:38 GMT
Hi all,
I would like to extract a piece of my  property file:

##################################################
#environnement A
##################################################
#Jdbc
#project.jdbc.datasource=datasource1
[...]
#End of environnement A

##################################################
#environnement B
##################################################
#Jdbc
project.jdbc.datasource=datasource2
[...]
#End of environnement B


and copy it in another file to have that:

##################################################
#environnement A
##################################################
#Jdbc
project.jdbc.datasource=datasource1
[...]
#End of environnement A

I don't know what is exatly in the sample, the only thing I know is the 
first 3 lines and the last line.
I tried to catch the text sample that interest me by using copy and 
filterchain

<copy file="${src}" tofile="${dest}">
	<filterchain>
		<filterreader classname="org.apache.tools.ant.filters.LineContainsRegExp">
			<param type="regexp" value="??????????????"/>
		</filterreader>
	</filterchain>
</copy>

but I didn't succeed!
Is that possible to take a piece of text and copy it in a file?
any help will be appreciate.

Momo

_________________________________________________________________
Hotmail : un compte GRATUIT qui vous suit partout et tout le temps ! 
http://g.msn.fr/FR1000/9493


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


Mime
View raw message