I am really empty on the side of Regex and why I could not get how to create a Regex in PHP that checks if a string has a specific character sequence.
$str = '2323,321,329,34938,23123,54545,123123,312312';
Allows you to check whether a string contains only integers (not decimal, nor alphabets, or anything else), separated by a comma (,).
user3182138
source
share