Avatar of LostForWords1987
LostForWords1987
Flag for United States of America

asked on 

Javascript Regex Question

I need a JavaScript Regex to do the following:

Example 1 - String = '0:9,1:5,2:6,3:1'  
Example 2 - String = '5:8'

I want to return everything after the ':' and before the ','.

Example 1 result:
9
5
6
1

Example 2 result:
8

Thanks
Regular ExpressionsJavaScript

Avatar of undefined
Last Comment
Julian Hansen

8/22/2022 - Mon