Need a regular expression pattern to extract a list of numbers

Rafael Soteldo 1 Reputation point

Hi there:

Suppose I have a string with “1: a string, 2: other string, 3: something else”, what would be the regex to obtain “1,2,3” as a result

Thank you in advance,


JavaScript API
JavaScript API
An Office service that supports add-ins to interact with objects in Office client applications.
915 questions
0 comments No comments
{count} votes