I suggest you to do in the following way:
(\d+)(,\s*\d+)*
which would work for a list containing 1 or more elements.
More Related Contents:
- Regex to split a CSV
- How can I parse quoted CSV in Perl with a regex?
- Powershell script to remove double quotes from CSV unless comma exists inside double quotes
- Regular expression [ 1 ( 0 1* 0)* 1 ]* DFA
- subdomain htaccess rediect with query string
- Learning Regular Expressions [closed]
- How to use Regular Expressions (Regex) in Microsoft Excel both in-cell and loops
- Regex to pick characters outside of pair of quotes
- Regex (grep) for multi-line search needed [duplicate]
- Match whitespace but not newlines
- Find ‘word’ not followed by a certain character
- How do I grep for all non-ASCII characters?
- Escape function for regular expression or LIKE patterns
- What regex can match sequences of the same character?
- What does ?! mean?
- What is the meaning of + in a regex?
- Extract substring using regexp in plain bash
- Password validation regex
- Parsing CSV input with a RegEx in java
- Javascript regex to validate IPv4 and IPv6 address, no hostnames
- What’s wrong with my lookahead regex in GNU sed?
- Regex capitalize first letter every word, also after a special character like a dash
- Regular expression to remove one parameter from query string
- Sed to extract text between two strings
- Swift 3 – How do I extract captured groups in regular expressions?
- Replace all whitespace with a line break/paragraph mark to make a word list
- Why do regex engines allow / automatically attempt matching at the end of the input string?
- How do I turn any regex into an complement of itself without complex hand editing?
- Apache mod_rewrite REDIRECT_STATUS condition causing directory listing
- Matching url with array list of words in AngularJS ui-router