fork download
  1. <?php
  2. $string = "The ‘big-yellow’ house-is near the lake";
  3. $regex = '~‘[^’]+’(*SKIP)(*FAIL)|-~';
  4. $parts = preg_split($regex, $string);
  5. print_r($parts);
  6. ?>
Success #stdin #stdout 0.02s 52472KB
stdin
Standard input is empty
stdout
Array
(
    [0] => The ‘big-yellow’ house
    [1] => is near the lake
)