<? $link = "http://www.internethaber.com/yilin-tiyatro-oyuncusu-10011y.htm"; preg_match("/\d+/",$link,$sonuc); echo $sonuc[0]; //Çıktısı (10011) ?>