ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sujeet Banerjee" <sujeet_baner...@persistent.co.in>
Subject Re: replace &lt; with < in property ??
Date Thu, 02 Feb 2006 15:42:43 GMT
Hello Gilbert

The attribute "regexp" represents the regular expression which is matched in the input string.
You
are trying to match a pattern that's a part of the input string. I'd suggest using perl (can
be
executed both in Linux/Win-x platforms)

-Sujeet
  ----- Original Message ----- 
  From: Rebhan, Gilbert
  To: user@ant.apache.org
  Sent: Thursday, February 02, 2006 8:30 PM
  Subject: replace &lt; with < in property ??



  Hi,

  Problem =

  i have a property like that :

  &lt;bla&gt;foobar&lt;/bla&gt;

  and i want it to convert to =

  <bla>foobar</bla> before putting in
  in a mailbody

  i've tried =

  <propertyregex property="foobar"
                    input="${auftrag.bemerkung}"
                    regexp="lt;"
                    replace="<"
                    casesensitive="false" />

  but that is not accepted.

  i've tried with javascript =

  <script language="javascript"><![CDATA[
          one=project.getProperty("foobar");
          two=one.replace("&lt;", "<");
          three=two.replace("&gt;", ">");
         project.setProperty("foobar", three);
    ]]></script>

  doesn't work either, gives me =

  org.mozilla.javascript.EvaluatorException: Cannot convert &lt; to
  java.lang.Character


  Any ideas ??

  bye4now, Gilbert

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

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message