RegExLib.com - The first Regular Expression Library on the Web!

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find Pattern Title
Expression
^(([0-2]*[0-9]+[0-9]+)\.([0-2]*[0-9]+[0-9]+)\.([0-2]*[0-9]+[0-9]+)\.([0-2]*[0-9]+[0-9]+))$
Description
Matches simple IP addresses. It's not too complex or long, but it does the job if you want something short/simple.
Matches
113.173.40.255 | 171.132.248.57 | 79.93.28.178
Non-Matches
189.57.135 | 14.190.193999 | A.N.D.233
Author Rating: The rating for this expression. Jag fire
Source
Your Rating
Bad Good

Enter New Comment

Title
 
Name
 
Comment
 
Spammers suck - we apologize. Please enter the text shown below to enable your comment (not case sensitive - try as many times as you need to if the first ones are too hard):

Existing User Comments

Title: Inadequate
Name: SJ
Date: 3/1/2009 11:08:42 PM
Comment:
It's useless, my first basic test is failed. Don't use it!


Title: Dangerous
Name: DominicT
Date: 10/28/2008 7:54:16 AM
Comment:
Worse than useless, because it fails valid addresses and passes invalid ones. 192.168.0.4 - which was on my home network for a while - should work, but doesn't.


Title: Inadequate
Name: John
Date: 2/16/2008 2:39:57 PM
Comment:
Of limited usefulness, since it fails 1.2.3.4 and allows 111.222.333.444


Title: Inadequate
Name: John
Date: 2/16/2008 2:39:39 PM
Comment:
Of limited usefulness, since it fails 1.2.3.4 and allows 111.222.333.444


Title: Awesome
Name: Bob
Date: 7/29/2004 4:07:24 PM
Comment:
great job, works great thx


Title: EW
Name: EW
Date: 7/28/2004 9:25:07 PM
Comment:
EW!


Title: good
Name: bad
Date: 3/4/2004 11:42:09 PM
Comment:
badbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadb


Title: Well, Valdimir...
Name: Darren Neimke
Date: 2/5/2004 6:59:14 AM
Comment:
I cannot say that I agree with you. Why do you say that it won't "catch" (I presume that you mean match) 172.616.21.30? I think that it does. By saying that I do not mean that this is a great pattern - it isn't! It is basically saying, match this: ([0-2]*[0-9]+[0-9]+) ... 3 times. The first part - [0-2]* - states that the first digit is optional while the next two character entities tell us that there can be anywhere between 1 and positive infinity digits; twice! Therefore, based on this pattern the following input would validate without problem: 99.999999999999.99.999999999 I'm sorry but I rated this pattern a "2".


Title: kly
Name: Vladimir
Date: 2/5/2004 6:11:37 AM
Comment:
this regexp can't catch 172.616.21.30


Title: ok
Name: good
Date: 1/7/2004 10:49:02 PM
Comment:
very good


Title: blah
Name: blah
Date: 10/10/2003 6:52:22 AM
Comment:
299.299.299.299 is valid!!!!!


Copyright © 2001-2024, RegexAdvice.com | ASP.NET Tutorials