A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Ant, Maven and Other Build Tools
Case sensitive Issue when using Ant Replace task
Joined: Nov 07, 2007
Apr 11, 2009 06:06:51
I want to rename the content of some files (by replacing a
with another) of a specific type (.htm) in a directory including all subdirectories.
Running an "Ant replace task" will do the work:
<replace dir="mydir" token="one" value="two">
This works fine, however I want the replace to be NON-casesensitive, so that e.g. 'ONE' is also replaced by 'two'.
How do I do that?
Joined: May 26, 2003
Apr 11, 2009 07:45:42
The optional task
allows you to specify any regular expression including non-case sensitivity. All the optional tasks require an extra jar in the classpath, so check the documentation before calling it.
How To Ask Questions The Smart Way
Blogging on Certs:
SCEA Part 1
Part 2 & 3
Core Spring 3
TOGAF part 1
It is sorta covered in the
JavaRanch Style Guide
subject: Case sensitive Issue when using Ant Replace task
How to convert java task to junit task to run a java class file
Custom ANT Task not working in <for> loop
Ant replace task problem
append a batch file
"Could not create task of type: echo"
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014