I am looking for a way to detect and drop quotes with in quotes, for example: something "something "something something" something" something.
In the above example the italic something something is wrapped in double-quotes as you can see. I want to strip the string inside from these outer quotes.
So, the expression should simply look for quotes with a text between them plus a another set of text-wrapping text, and then drop the quotes wrapping the last.
This is my current code (php):
preg_match_all('/".*(".*").*"/', $text, $matches);
if(is_array($matches[0])){
foreach($matches[0] as $match){
$text = str_replace($match, '"' . str_replace('"', '', $match) . '"', $text);
}
}