title: ANT - regex in headfilter
body: <p>First of all I am very new to ANT and I researched a lot about the problem I am facing but didnt get any success. 
  I am trying to get SVN revision no. by the following ant task. I got the revision no. but I guess there is a new line in that revision number. When I append that number to artifact I see ? in that.</p>
  
  <p><code>&lt;target name="revision-number" &gt;</code>
     <code>&lt;loadfile srcfile="${basedir}/projectName/.svn/entries" property="revision"&gt;</code> 
         <code>&lt;filterchain&gt;</code> 
            <code>&lt;headfilter lines="1" skip="3"/&gt;</code>
         <code>&lt;/filterchain&gt;</code>
     <code>&lt;/loadfile&gt;</code>
     <code>&lt;echo file="REVISION" message="${revision}"/&gt;</code>
    <code>&lt;/target&gt;</code></p>
  
  <p>ZIP logic goes here.</p>
  
  <p>when I see the name in unix terminal it shows - projectName.12345?.tar.gz
  and in winscp name is correct - projectName.12345.tar.gz</p>
  
  <p>logs 
        [echo]  Start Zip 
        [tar] Building tar: /opt/maven/hudson/jobs/project/workspace/projectName.tar
       [gzip] Building: /opt/maven/hudson/jobs/project/workspace/projectName.156308
       [gzip] .tar.gz
       [echo]  Stop Zip </p>
  
  <p>There are two [gzip]</p>
  
  <p>I am getting error while copying .gz file using winscp  (error code 123)
  so I want to strip this new line. </p>
  
  <p>Thanks</p>