Try escaping the & character xml-style with & instead of \&
pattern="&lt;" -Andrew On 8/22/07, Chun Ji <[EMAIL PROTECTED]> wrote: > > > Hi, > > Does someone know how to replace a string such as "<" to be "<" in a > html file by ANT. > The target that I have created in my build.xml is : > " > ... > <target name="change"> > <replaceregex file="test.html" pattern="\<" replace="<" /> > <replaceregex file="test.html" pattern="\>" replace=">" /> > </target> > .. > ", > > but I see such errors: > " > The value of attribute "replace" associated with an element type > "replaceregex" must not contain the '<' character. > " > > > Thanks a lot, > > > Charlie > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >