I am really empty at Regex side and that\'s why couldn\'t get how to make a Regex in PHP which checks if the string has this particular sequence of characters.
Just for fun with no regex:
var_dump( !array_diff($a = explode(',', $str), array_map('intval', $a)) );