What is the proper way to format the replace attribute of a replaceregexp
task so that HTML < and > characters appear in the output?  My problem is,
no matter how I write the attribute, my less than and greater than
characters are being written out as escaped entities in the output file. 
(ampersand lt semicolon)

I'm trying to syntax highlight source files for display in a web browser. 
So the source file might have a comment in it like this:

   /* This is a comment */

I want to process the file to surround the comment with an HTML span tag so
it looks like this:

  /* This is a comment */

My replaceregexp task looks like this:

        <replaceregexp match="[/][\*](.*?)[\*][/]" replace="&lt;span
class='comment'&gt;\0&lt;/span&gt;" flags="sg" byline="false">
            <fileset dir="${rootPath}"/>
        </replaceregexp>

I've tried putting the (ampersand lt semicolon) in a property...  I've tried
using (ampersand #x003c semicolon) What am I doing wrong?
-- 
View this message in context: 
http://www.nabble.com/replaceregexp-and-html-tags-in-replace-attribute-tp21378141p21378141.html
Sent from the Ant - Users mailing list archive at Nabble.com.


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

Reply via email to