I have some internet traffic data to analyze. I need to analyze only those packets that are within a certain IP range. So, I need to write a if statement. I suppose I need a regular expression for the test condition. My knowledge of regexp is a little weak. Can someone tell me how would I construct a regular expression for that condition. An example range may be like
Group A 56.286.75.0/19 57.256.106.0/21 64.131.14.0/22 Group B 58.176.44.0/21 58.177.92.0/19 The if statement would be like
if("IP in A" || "IP in B") { do something } else { do something else } so i would need to make the equivalent regexp for "IP in A" and "IP in B" conditions.