I have a text area and a user can input US zip codes in it separated by a comma or (comma and space).
It could be like 12345,45678, 89654
The following regex i
Use this regex: ^\d{5}(, ?\d{5})*$
^\d{5}(, ?\d{5})*$
It specifies 5 digits at the beginning: ^\d{5} and any number of other comma, space, and 5 digit combinations: (, ?\d{5})*
^\d{5}
(, ?\d{5})*