ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gilbert Rebhan <...@schillbaer.de>
Subject Re: replaceregexp issues...
Date Fri, 15 Feb 2008 20:48:18 GMT


> Ok i have this:
> <replaceregexp file="database.sql" match="\0" replace="" flags="g" />
> and i keep getting this error when i run my ant task
> near index 2
> \0

the match attribute should contain your regular expressions (where
btw in java '\' has to be masked with a leading '\' so it should be
'\\') not a group, a '\' followed by a digit means a specific group of
your regular expression f.e. \0 =all, the whole match, \1 = group 1,
\2 = group 2 ... and so on

so you should write something like (don't know your regular expression
or text you need to replace)
<replaceregexp file="database.sql" match="\d+(blabla)\d+" replace="\1"
flags="g" />

If you want further help you should come up with more details.
What do you need to be replaced in your sql file ?
Maybe some snippet of your sql would be helpful.

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