$re = '/\/s1600-h\/[^\/\s\'"]+/m';
$str = 'http://localhost/wpcomics/wp-content/images/_Tkt_A2r1p6I/RYijDxlcBEI/AAAAAAAAAEU/DDbPKl6WZ30/s1600-h/tedsobject.jpg
http://localhost/wpcomics/wp-content/images/_Tkt_A2r1p6I/RYijDxlcBEI/AAAAAAAAAEU/DDbPKl6WZ30/s400/tedsobject.jpg
http://localhost/wpcomics/wp-content/images/_Tkt_A2r1p6I/RYgspBlcBDI/AAAAAAAAAEI/rNF6YqYaaaA/s1600-h/artoutoftimebook.jpg
http://localhost/wpcomics/wp-content/images/_Tkt_A2r1p6I/RYgspBlcBDI/AAAAAAAAAEI/rNF6YqYaaaA/s400/artoutoftimebook.jpg
http://localhost/wpcomics/wp-content/images/_Tkt_A2r1p6I/RYaXmhlcBCI/AAAAAAAAAD8/YL8YxxkAAzk/s1600-h/funnyfables.jpg';
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