fork download
  1. <?php
  2. $str="The ‘big-yellow’ house-is near the lake";
  3. $keywords = preg_split("/-(?![a-z]+’ )/", $str);
  4. print_r($keywords);
  5. ?>
  6.  
Success #stdin #stdout 0.02s 52432KB
stdin
Standard input is empty
stdout
Array
(
    [0] => The ‘big-yellow’ house
    [1] => is near the lake
)