i need a regex for: 123,456,789,123,4444,... basically comma separated values. The INT part can be 1-4 numbers long, followed by a comma…always in this form…
/^([0-9]{1,4})(\,)?$/
This obviously doesn’t work…
Thanks!
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Try this:
This will match any comma separated sequence of one or more digit sequences with one to four digits.
(?:…)is a so called non-capturing group that’s match cannot be referenced separately like you can with “normal” capturing groups(…).