Regex matches a comma in a string

I need a to match a comma in a string, this is an example:

dog: cat, hello: Bye, Num :, 1,2,3,5,6,7,8,9,10, that's what:

Image

I want to combine ONLY a comma with a green arrow using a regex or something

The value "num:" will always be the same. example "num :, 4,7,9" or "num :, 2"

Thank you in advance

+4
source share
1 answer

This should do it:

,(?=\w+:) 
+7
source

Source: https://habr.com/ru/post/1437210/


All Articles