$re = '/\(([^()/]+(?:/[^()/]+)*)\)/m';
$str = 'stuff (word1/Word2/w0rd3) stuff, stuff (word4/word5) stuff stuff (word6) stuff (word7/word8/word9) stuff stuff, (w0rd10/word11) stuff stuff (word12) stuff (Word13/w0rd14/word15) stuff-stuff stuff (word16/word17).';
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