<?php
$strings = [
'(STR,0:30) + |"Outdoor"| + |"Chair Mat","Commercial Floor Mat","Door Mat"| + [Post Type] + (STR,0:30)',
'(STR,0:30) + |"Outdoor"| + |"Red, Yellow, and Green Jamaican Mat"| + [Post Type] + (STR,0:30)',
'(STR,0:30) + |"Outdoor"| + |"USA \"MAGA\" Mat"| + [Post Type] + (STR,0:30)',
];
print_r(
preg_replace('~\|("[^"\\\\]*(?:\\\\"[^"\\\\]*)*")\|~', '\1', $strings)
);
preferences:
26.9 ms | 402 KiB | 5 Q