Is it possible to optionally match paired quotations marks (before and after a string)?
I’m trying to make a substitution in a file with a one liner regex. sed failed me so I turned to perl. I can for example match “setting = value # comment” and extract it in three parts “setting = “, “value” and ” # comment”.
perl regex negative lookahead replacement with wildcard
Updated with real and more complicated task: