fork(4) download
  1. cat << EOF | perl -pe 's{^\s*\n$}{}; s/ +(?=(([^"]+"){2})*[^"]*$)//g'
  2. This is an example text with some spaces.
  3.  
  4.  
  5.  
  6. This should be 2nd line.
  7.  
  8. However the spaces between "quotes should not change".
  9.  
  10. last line.
  11. EOF
Success #stdin #stdout 0.02s 5348KB
stdin
Standard input is empty
stdout
Thisisanexampletextwithsomespaces.
Thisshouldbe2ndline.
Howeverthespacesbetween "quotes    should not    change".
lastline.