Can you tell me what is the regular expression for a comma-separated list (in this case - IPs) ?
My list looks like this:, 10.%.23.100, %.46.%.1

So far I managed to create this:


But I don't know how to specify a comma-separated list of the above sequence.


Maybe I am not understanding what you want to do, but why not split the string on the comma?

if you do this:

var str=",,";

var array = str.split(",");

for(wordIndex in array)
     //array[wordIndex] is each individual address
     //run REGEX on each one to determine if it is valid or whatever you are planning


Better yet... str.split(/\s*,\s*/) which will get rid of white spaces before and after comma... This would take care of "ab,c, de , g,h,i" as an array with elements ["ab", "c", "de", "g", "h", "i"] instead of ["ab", "c", " de ", " g", "h", i"] as the suggested above post. Though, the above post is going on the right track. :)

PS: This thread is almost a month old already!!!