Title |
Test
Find
Pattern Title
|
Expression |
^((https?|ftp)\://((\[?(\d{1,3}\.){3}\d{1,3}\]?)|(([-a-zA-Z0-9]+\.)+[a-zA-Z]{2,4}))(\:\d+)?(/[-a-zA-Z0-9._?,'+&%$#=~\\]+)*/?)$ |
Description |
Using other regular experssions from this page, combining others for email addresses, and mixing in my own ideas - I came up with this regular expression. Can be used to validate input into a database. |
Matches |
http://207.68.172.254/home.ashx | ftp://ftp.netscape.com/ | https://www.brinkster.com/login.asp |
Non-Matches |
htp://mistake.com/ | http://www_address.com/ | ftp://www.files.com/file with spaces.txt |
Author |
Rating:
Benjamin Gray
|
Source |
|
Your Rating |
|
Title: if to match example.com
Name: Zina
Date: 8/21/2007 2:14:21 AM
Comment:
nice pattern
if you want to match some web pages like example.com
then i would add as well smth from myself
(((https?|ftp)\://|)((\[?(\d{1,3}\.){3}\d{1,3}\]?)|(([-a-zA-Z0-9]+\.)+[a-zA-Z]{2,4}))(\:\d+)?(/[-a-zA-Z0-9._?,'+&%$#=~\\]+)*/?)
Title: Check IP
Name: xMANIGHTx
Date: 5/22/2003 3:32:34 PM
Comment:
You should check for IP valuse to keep them in the 0-255 range... this exp is nice!!!