<?php $string = " text1 .id.123 .id.4576 text4 .id.56778 text 5 .id.76728"; preg_match_all('~\.id\.\K\d+~', $string, $m); echo implode(',', $m[0]);
You have javascript disabled. You will not be able to edit any code.