3v4l.org

run code in 300+ PHP versions simultaneously
<?php $subject = "http://directory.google.com/Category/Subcategory/Another_Subcategory"; $pattern = "directory.google.com/[A-Z][a-zA-Z_/]+$"; preg_match_all($pattern, $subject, $matches, PREG_PATTERN_ORDER); print_r($matches);

preferences:
36.54 ms | 402 KiB | 5 Q