Archivo de la etiqueta: regex

Matching a pattern that can be repeated in Regex

I want to write a regulated expression so that I can enter either one address like this C4:C15 or multiple ones (at most 3 in total) seperated by a comma like B3:B5,B7:B10,C4:C6

I already know how to enter each one separately using “^([B-” + Chr(Asc(“A”) + 2) + “])([2-9]|[1-9][0-9])?:?1([2-9]|[1-9][0-9])?(,)?$”, however how can I do that to add one or two more knowing that I know how many addresses I need but I don’t want to do it in a for loop.