ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chad Armstrong <>
Subject character replace
Date Fri, 22 Jul 2005 20:33:50 GMT
Hello all,
  Today seems to be regular expression day on the list, so here is my input ;)

  I have a block of code in my build script:

    <script language="javascript">
      strResourceDef = project.getProperty("MSVC.Pre-Link.RESOURCE_DEF");
      strReplace = strResourceDef.replaceAll(";","\\r\\n");
      project.setProperty("RESOURCE_DEF_REPLACE", strReplace);

  What this is supposed to do is is transform a string like
string;string;string; into string\r\nstring\r\nstring\r\n, but the
above transforms to stringrnstringrnstringrn, and using \r\n or
\\\r\\\n causes actual newlines to be output, which is not what I
want. I've tried using entities as well and they just get output
verbatim.  Any clues?


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message