Removing whitespace-characters, except inside quotation marks in PHP?

ctyepy9hot

New Member
I couldn't find any similar question, so I start a new one.I need to remove all whitespace from string, but quotations should stay as they were. I'm building a personal kind of minifier.Here's an example:\[code\]string to parse:hola hola "pepsi cola" yayoutput:holahola"pepsi cola"yay\[/code\]Any idea? I'm sure this can be done with regexp, but any solution is okay.Martti Laine
 
Back
Top