I am contacting the suggestion of some regular expression that will remove all space characters from the string if it is not inside double quotes (").
Example line:
some string with quoted text
Result:
somestring with quoted text
So far I have come up with something like this:
$str =~ /"[^"]+"|/g;
But it does not seem to give the expected result.
I honestly am very new to Perl and have not had too much experience in regex. Therefore, if someone who wants to answer will also be ready to give some idea of why and how cool it would be!
Thank!
EDIT
The string will not contain escape files
In fact, it should always be formatted as follows:
Some.String = "Some value"
Some.String = " "