im trying parse url last 2 / sections. need address (can that) , number(second section {ie:08078612,08248595} unless @ last , no address present {last url list example} {ie: 8274180}) optionally need last 3 digits of second numbers section.{ie 612,595,180} im not having luck heres code far. $url_list[] = $url; if(preg_match("/[0-9]/",substr(strrchr($url, '/'), 1))) { $url_list_mls[]= substr(strrchr($url, '/'), 2); $url_list_mls_last3[] = substr(strrchr($url, '/'), -3); } else { $url_list_mls[]= substr(strrchr($url, '/'), 1); $url_list_mls_last3[] = substr(strrchr($url, '/'), -3); } $url_list_addy[]= substr(strrchr($url, '/'), 1); example urls (part of full url endings examples) /a019/08078612/214-n-crest-avenue /a019/08248595/111-n-elroy-avenue /a019/8274180 im trying make 3 lists, address (last section) number (second section) , last 3 numbers of second section number. the original code