Exactly as the title asks:
How would I remove all unnecessary spaces between single quotes skipping escaped quotes in PHP?
I am looking for a fast implementation to pre-prep for parsing. I would prefer not to use regex if it would be slower than using a simple loop.
(The double quotes below are for display purposes only)
examples would be:
input:
" testing ' this is a \'test\' ' zzz "
output:
"testing ' this is a \'test\' ' zzz"