<?php $re = "/\\d+,\\d+/"; $str = "1,2,3,4,5,6,7,8"; preg_match_all($re, $str, $matches);print_r($matches);
Standard input is empty
Array ( [0] => Array ( [0] => 1,2 [1] => 3,4 [2] => 5,6 [3] => 7,8 ) )
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!