Hi Hilary. I have Qrules already FYI. I really just need validation. I have tried regex but cant seem to get it 100 percent correct. So the possible values are as follows:
1-48 example: 1,2,3-10,15-20 the same is valid if you do it this way 1,2,3,4,5,6,7,8,9,10,15,16,17,18,19,20
and 1/1-48 2/1-48 3/1-48 and 4/1-48
a comma is a delimited and the dashes provide a way to do shortcuts. So as an example 1/1-10,2/1,2/2-10,4/1-48 is valid
In short this is a form for a ethernet switch generator which can have up to 4 switches of 48 ports each. The problem with the regex is that I could not find a way to figure out duplicates i.e 1/1,1/1 or 1/1,1/1-4, 1/3 which clearly has 1/1 as a dup and 1/3 as a dup as well.
My thinking was to figure out a way to translate user input as follows: 1/1-10 and translate that in to 1/1,1/2,1/3,1/4,1/5,1/6,1/7,1/8,1/9,1/10 and thus if i translate this only then will i be able to effectively do a regex for validation. I hope I explained this clear enough.