$re = '~(-[^-]{2}-[^-]|-[^-])(?=\/.*)~';
$str = 'H-Foo-Bar-cu-s/9.htm
Some-Thing-sb-s/22297.htm
Foo-Boo-or-Bar-cu-s/553.htm
Random-32-Ness-Can-be-Fun-cu-s/4617.htm
Chicken-Fried-264-Seaturtles-for-Pennies-cu-s/3971.htm
Asymetrical-Banana-Party-p/asy-banana-p.htm';
preg_match_all($re, $str, $matches, PREG_SET_ORDER, 0);
// Print the entire match result
var_dump($matches);
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for PHP, please visit: http://php.net/manual/en/ref.pcre.php