ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rhino" <>
Subject Minor replaceregexp question
Date Sat, 11 Feb 2006 21:36:06 GMT
I'm using replaceregexp in Ant 1.6.5 to transform one string to another. 
It's working perfectly but I'm having trouble making it do one small thing.

I'm trying to put a tab at the beginning of the replacement string but 
nothing I do seems to get interpreted as a tab in the replace parameter.

Here's my task:

<target name="Set_List_Format" description="Ensure that job descriptions in 
the Employment History section will appear as bulleted lists.">
 <replaceregexp file="${resume.src}\${resume.pkg}\"
  match="^[\s]*public static final EmploymentHistoryFormats 
  replace="    public static final EmploymentHistoryFormats 

For the moment, I'm getting by with just hardcoding four spaces at the 
beginning of the replace parameter but there must be some way to indicate a 
tab within the replace parameter, right? If so, could someone enlighten me 
on the appropriate technique? I've tried using \t \\t and even [\s](4) at 
the start of the replace parameter but none of those worked.

I'd just like to put an actual tab at the start of a line rather than spaces 
in case I change the tab size at some point.


No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.375 / Virus Database: 267.15.6/257 - Release Date: 10/02/2006

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

View raw message