3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php preg_match('/(s3\:\/\/[0-9A-z\-\_\.]+\@[0-9A-z\-\.]+\.com)\/(.*)\/([0-9A-z]+\.(jpg|png|jpeg|gif))/', 's3://aqadd.com.ssrmap@s3-eu-west-1.amazonaws.com/listings/17/28/2385fd6a3c3a036c0e41eaf6c6654839.jpg', $matches); var_dump($matches);
based on d7pFj
Output for 4.3.0 - 7.2.0
array(5) { [0]=> string(100) "s3://aqadd.com.ssrmap@s3-eu-west-1.amazonaws.com/listings/17/28/2385fd6a3c3a036c0e41eaf6c6654839.jpg" [1]=> string(48) "s3://aqadd.com.ssrmap@s3-eu-west-1.amazonaws.com" [2]=> string(14) "listings/17/28" [3]=> string(36) "2385fd6a3c3a036c0e41eaf6c6654839.jpg" [4]=> string(3) "jpg" }