Google Answers Logo
View Question
 
Q: Regular Expressions Help (RegEx Help) ( No Answer,   1 Comment )
Question  
Subject: Regular Expressions Help (RegEx Help)
Category: Computers
Asked by: timberline-ga
List Price: $3.00
Posted: 24 Aug 2006 14:16 PDT
Expires: 23 Sep 2006 14:16 PDT
Question ID: 759224
I'm looking for the RegEx syntax for matching all IP addresses that
are NOT in the range of 200.100.100.125  - 200.100.100.175

I'm also looking for the RegEx for matching all IP address that are
not 200.100.100.176

I will test the answers using RegEx Coach.
Answer  
There is no answer at this time.

Comments  
Subject: Re: Regular Expressions Help (RegEx Help)
From: kaspy-ga on 25 Aug 2006 19:59 PDT
 
I have no idea that such a tool (Regex Coach) exists. It is simple,
but works. Thanks! The expressions to match your strings might look a
bit cumbersome (see below), I would avoid using regex for matching
numers.

This one should work with no-range:

((2(([0-4]\d)|5[0-5]))|(1?\d{1,2}))\.((2(([0-4]\d)|5[0-5]))|(1?\d{1,2}))\.((2(([0-4]\d)|5[0-5]))|(1?\d{1,2}))\.((2(([0-4]\d)|5[0-5]))|(1[0189]\d)|(12[0-4])|(17[6-9])|(\d{1,2}))

This one should work with no-particular ip:

((2(([0-4]\d)|5[0-5]))|(1?\d{1,2}))\.((2(([0-4]\d)|5[0-5]))|(1?\d{1,2}))\.((2(([0-4]\d)|5[0-5]))|(1?\d{1,2}))\.((2(([0-4]\d)|5[0-5]))|(1[0-689]\d)|(17[0-57-9])|(\d{1,2}))

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy