fork download
  1. $_ = 'this is a test string "hello here" and another "hello there" and so on...';
  2. s/\s+(?=(?:[^"]*"[^"]*")*[^"]*$)//g;
  3. print $_;
  4.  
Success #stdin #stdout 0s 4552KB
stdin
Standard input is empty
stdout
thisisateststring"hello here"andanother"hello there"andsoon...