...and worked rather better when I added... %% skip escaped quotes inside strings... strip(<<$\\, $", Rest/binary>>, Acc, true) -> strip(Rest, [$", $\\|Acc], true); ...oops!