<?php $string = 'Hello "world". [start]this is a "mark"[end]. It should work with [start]"several" "marks"[end]'; $regex = '/(?s)"(?=((?!\[start\]).)*\[end\])/'; $replace = '"'; echo preg_replace($regex, $replace, $string);
You have javascript disabled. You will not be able to edit any code.