title: How to remove carriage returns in the middle of a line
body: <p>I have file that is read by application in unix and windows. However I am encountering problems when reading in windows with ^M in the middle of the data. I am only wanting to remove the ^M in the middle of the lines such as field 4 and field 5.</p>
  
  <p>I have tried using <code>perl -pe 's/\cM\cJ?//g'</code> but it removes everything into one line which i don't want. I want the data to stay in the same line but remove the extra ones </p>
  
  <pre><code># Comment^M
  # field1_header|field2_header|field3_header|field4_header|field5_header|field6_header^M
  #^M
  field1|field2|field3|fie^Mld4|fiel^Md5|field6^M
  ^M
  </code></pre>
  
  <p>Thanks</p>