ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <pritesh.saha...@wipro.com>
Subject Issue using ReplaceRegExp
Date Fri, 21 Oct 2005 13:09:05 GMT

Hi All,
         I am trying to use ReplaceRegExp but finding it difficult to
cope with it.

	 There is a log.txt file generated from my build.xml using
record task which looks like this;
	 log.txt
	 -------
	        [java] Done!
              [java]
              [java] bytes read: 111059499
              [java] bytes written: 111059499
              [java] parts created: 11
              [java] time used: 46.562 sec.

	Now I wanted to use the value of "parts created" which is "11"
but I am not able to use ReplaceRegExp properly
	It is giving me error message:

	No supported regular expression matcher found

	I am using jdk1.3.1_11

	I noticed one thing before [java] text there are 5spaces

	The whole idea is that I wanted to use this log.txt file as a
property file, which I am unable to, and as a
	Experiment I have done something like this in my build.xml file

	<target name="try-rep">
		<replaceregexp file="log.txt"
		               match="[java]"
					   replace="\0${insert}"
					   byline="true">
			<!--
			<regexp pattern="[java]" />
			<substitution expression="\0"/>
			-->
		</replaceregexp>

        If I want to use this log.txt file as a property file than I
think I have to replace the strings till : (colon)

  Can anyone help me out?

  Wishes
  Pritesh



Confidentiality Notice

The information contained in this electronic message and any attachments to this message are
intended
for the exclusive use of the addressee(s) and may contain confidential or privileged information.
If
you are not the intended recipient, please notify the sender at Wipro or Mailadmin@wipro.com
immediately
and destroy all copies of this message and any attachments.

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


Mime
View raw message