Tuesday, August 21, 2007

Regular expression for range of IP addresses

I have several Google Analytics accounts where I wanted to exclude internal traffic for. After checking some popular regular expression libraries such as regexlib.com and not coming up with anything I liked, I came up with the regular expression by hand. However, I didn't realize that on the helpful link of Google Analytics to "How can I exclude my internal traffic from my reports?", a very easy to use JavaScript IP address range generator, that would be helpful anytime you needed to do an IP address range check.