Title |
Test
Find
url
|
Expression |
(?:(?:(?:http|ftp|gopher|telnet|news)://)(?:w{3}\.)?(?:[a-zA-Z0-9/;\?&=:\-_\$\+!\*'\(\|\\~\[\]#%\.])+) |
Description |
an expression to match internet addresses with one of the known protocolls (http, ftp, gopher, telnet, news) |
Matches |
http://ifi.lmu.de | ftp://leo.org | gopher://gopher.com |
Non-Matches |
www.google.com |
Author |
Rating:
Not yet rated.
Kis Hajnalka
|
Source |
|
Your Rating |
|
Title: regexp doesnt work for me
Name: Alexander
Date: 10/30/2007 2:06:41 PM
Comment:
Something is wrong with this Regexp.
1)(?:(?:(?:http|ftp|gopher|telnet|news)://)(?:w{3}\.)?(?:[a-zA-Z0-9/;\?&=:\-_\$\+!\*'\(\|\\~\[\]#%\.])+)
2)(?:(?:(?:http|ftp|gopher|telnet|news)://)(?:w{3}\.)?(?:[a-zA-Z0-9/;\?&=:\-_\$\+!\*'\(\|\\~\[\]#%\.])+))
firstly:
at 1 is the postet regexp. but i think there need to be placed at least an additional right parenthesis to close the first parenthesis (2)
secondly:
look at this part at the end:
(?:[a-zA-Z0-9/;\?&=:\-_\$\+!\*'\(\|\\~\[\]#%\.])+)
theres a beginning square bracket inside. behind the closing square bracket is a right parenthesis. the corresponding left parenthesis is inside the squared bracketing. so u have a wrong nesting.
anyway: this regexp doesnt work for me. it generates syntax errors.
Title: regexp doesnt work for me
Name: Alexander
Date: 10/30/2007 2:06:23 PM
Comment:
Something is wrong with this Regexp.
1)(?:(?:(?:http|ftp|gopher|telnet|news)://)(?:w{3}\.)?(?:[a-zA-Z0-9/;\?&=:\-_\$\+!\*'\(\|\\~\[\]#%\.])+)
2)(?:(?:(?:http|ftp|gopher|telnet|news)://)(?:w{3}\.)?(?:[a-zA-Z0-9/;\?&=:\-_\$\+!\*'\(\|\\~\[\]#%\.])+))
firstly:
at 1 is the postet regexp. but i think there need to be placed at least an additional right parenthesis to close the first parenthesis (2)
secondly:
look at this part at the end:
(?:[a-zA-Z0-9/;\?&=:\-_\$\+!\*'\(\|\\~\[\]#%\.])+)
theres a beginning square bracket inside. behind the closing square bracket is a right parenthesis. the corresponding left parenthesis is inside the squared bracketing. so u have a wrong nesting.
anyway: this regexp doesnt work for me. it generates syntax errors.