While not directly answering your question, once the day's frustration has worn off, you might find the "
Don't Use Regular Expressions To Parse IP Addresses!" thread to be of some interest or value.
cheers,
ybiC
striving toward Perl Adept
(it's pronounced "why-bick")