(http|ftp|https):\/\/[\w\-_]+(\.[\w\-_]+)+([\w\-\.,@?^=%&:/~\+#]*[\w\-\@?^=%&/~\+#])?
|
http://regxlib.com/Default.aspx | http://electronics.cnet.com/electronics/0-6342366-8-8994967-1.html |
www.yahoo.com |
^\\{2}[\w-]+\\(([\w-][\w-\s]*[\w-]+[$$]?$)|([\w-][$$]?$))
|
\\server\service | \\server\my service | \\serv_001\service$ |
\\my server\service | \\server\ service | \\server$\service |
^(http|https|ftp)\://([a-zA-Z0-9\.\-]+(\:[a-zA-Z0-9\.&%\$\-]+)*@)?((25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9])\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[0-9])|([a-zA-Z0-9\-]+\.)*[a-zA-Z0-9\-]+\.[a-zA-Z]{2,4})(\:[0-9]+)?(/[^/][a-zA-Z0-9\.\,\?\'\\/\+&%\$#\=~_\-@]*)*$
|
http://www.sysrage.net | https://64.81.85.161/site/file.php?cow=moo's |ftp://user:pass@host.com:123 |
sysrage.net |
^([a-zA-Z]\:|\\\\[^\/\\:*?"<>|]+\\[^\/\\:*?"<>|]+)(\\[^\/\\:*?"<>|]+)+(\.[^\/\\:*?"<>|]+)$
|
c:\Test.txt | \\server\shared\Test.txt | \\server\shared\Test.t |
c:\Test | \\server\shared | \\server\shared\Test.? |
^(http|https|ftp)\://([a-zA-Z0-9\.\-]+(\:[a-zA-Z0-9\.&%\$\-]+)*@)*((25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9])\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[0-9])|localhost|([a-zA-Z0-9\-]+\.)*[a-zA-Z0-9\-]+\.(com|edu|gov|int|mil|net|org|biz|arpa|info|name|pro|aero|coop|museum|[a-zA-Z]{2}))(\:[0-9]+)*(/($|[a-zA-Z0-9\.\,\?\'\\\+&%\$#\=~_\-]+))*$
|
http://site.com/dir/file.php?var=moo | https://localhost |ftp://user:pass@site.com:21/file/dir |
site.com | http://site.com/dir// |
^([a-zA-Z]\:)(\\[^\\/:*?<>"|]*(?<![ ]))*(\.[a-zA-Z]{2,6})$
|
C:\di___r\fi_sysle.txt | c:\dir\filename.txt |
c:\dir\file?name.txt |
^([a-zA-Z0-9]([a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,6}$
|
regexlib.com | this.is.a.museum | 3com.com |
notadomain-.com | helloworld.c | .oops.org |
^(((ht|f)tp(s?))\://)?(www.|[a-zA-Z].)[a-zA-Z0-9\-\.]+\.(com|edu|gov|mil|net|org|biz|info|name|museum|us|ca|uk)(\:[0-9]+)*(/($|[a-zA-Z0-9\.\,\;\?\'\\\+&%\$#\=~_\-]+))*$
|
www.blah.com:8103 | www.blah.com/blah.asp?sort=ASC |www.blah.com/blah.htm#blah |
www.state.ga | http://www.blah.ru |
\b(([\w-]+://?|www[.])[^\s()<>]+(?:\([\w\d]+\)|([^[:punct:]\s]|/)))
|
http://foo.com/blah_blah | http://foo.com/blah_blah/ | (Something like http://foo.com/blah_blah) | http://foo.com/blah_blah_(wikipedia) | (Something like http://foo.com/blah_blah_(wikipedia)) | http://foo.com/blah_blah. |http://foo.com/blah_blah/. | <http://foo.com/blah_blah> | <http://foo.com/blah_blah/>| http://foo.com/blah_blah, | http://www.example.com/wpstyle/?p=364. | http://?df.ws/123 | rdar://1234 | rdar:/1234 | http://userid:password@example.com:8080 |http://userid@example.com | http://userid@example.com:8080 |http://userid:password@example.com |
no_ws.example.com | no_proto_or_ws.com | /relative_resource.php |
相关推荐
正则匹配URL
isMobileSimple : 验证手机号(简单) isMobileExact : 验证手机号(精确) isTel : 验证电话号码 isIDCard15 : 验证身份证号码15位 isIDCard18 : 验证身份证号码18位 ...getReplaceAll : 替换所有正则匹配的部分
匹配网址URL的正则表达式 匹配国内电话号 匹配中国邮政编码 匹配身份证 匹配ip地址 匹配特定字符串 匹配中文字符的正则表达式 匹配双字节字符(包括汉字在内) 匹配HTML标记的正则表达式 匹配首尾空格的正则表达 式
该文档是针对mysql和oracle数据库url地址的校验问题。
本文实例讲述了JS正则匹配URL网址的方法。分享给大家供大家参考,具体如下: 最强的匹配网址-url的正则表达式:匹配www,http开头的一切网址 直接插入正则表达式: [a-zA-Z0-9][-a-zA-Z0-9]{0,62}(\.[a-zA-Z0-9][-a-zA...
在System.Text.RegularExpression命名空间里,有正则表达式方法。 代码如下:using System.Collections.Generic;using System.Text;using System.Text.RegularExpressions; namespace RegexDemo{ class Program { ...
NULL 博文链接:https://pwc-pengwenchao.iteye.com/blog/762456
正则表达式(regular expression)描述了一种字符串匹配的模式,可以用来检查一个串是否含有某种子串、将匹配的子串做替换或者从某个串中取出符合某个条件的子串等。 则表达式: var match = /^((ht|f)tps?):\/\/[\w\...
%<本人做的是asp.net的项目,内容是阻止一个文本框中的某些URL>% 首先,正则表达式: ..."; 关于该正则表达式的说明: ①:该正则表达式匹配的字符串必须以...②:该正则表达式能匹配URL或者IP地址;(如:http:
匹配Email地址的正则表达式:\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)* 匹配网址URL的正则表达式:^[a-zA-z]+://(\w+(-\w+)*)(\.(\w+(-\w+)*))*(\?\S*)?$ 匹配帐号是否合法(字母开头,允许5-16字节,允许字母...
与NFA相对应,DFA (deterministic finite-state automata)表示确定性有限状态自动机。与NFA不同,DFA不存在Epsilon转换,并且每一个状态转换函数的值只对应一个状态,即一个状态输入一个字符,只能有一个状态相对应
使用正则表达式匹配URL的简单方法,提供测试代码
主要介绍了java正则表达式匹配网页所有网址和链接文字java正则表达式匹配,需要的朋友可以参考下
js代码-(算法)正则表达式匹配url
最近写了个python抓取必应搜索首页http://cn.bing.com/的背景图片并将此图片更换为我的电脑桌面的程序,在正则匹配图片url时遇到了匹配失败问题。 要抓取的图片地址如图所示: 首先,使用这个pattern reg = re....
使用httpclient抓取页面信息时需要填写HOST,使用此正则提取抓取URL的HOST内容
正则表达式以匹配网址。 安装 使用可以: $ npm install regex-url --save-dev 用法 var regexUrl = require ( 'regex-url' ) ; console . log ( 'Favourite website https://github.com/' . match ( regexUrl ) )...