如何使用正则表达式验证WebAddress [英] How to Validate a WebAddress using Regular Expression

查看:85
本文介绍了如何使用正则表达式验证WebAddress的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发基于Windows的系统。在这里,我想使用正则表达式验证网址。不想包含http。想要查看www.abc.com,www.abc.co.in,www.abcdedf.org这样的网址。想要验证最终。也

解决方案

尝试:

 www \。(?< domain> [\\\ 。@] [\w:??@] +)\ / [\w\ =%&安培; = \  -  @ / 

,] *





愚蠢的HTML标签更接近......:笑:[/ edit]


I am Working on a windows based system. Here I want to validate web address using regular expression. Don't want to include the http. Want to check Web address like www.abc.com, www.abc.co.in, www.abcdedf.org like that. Want to Validate the Final "." too

解决方案

Try:

www\.(?<domain>[\w@][\w.:@]+)\/?[\w\.?=%&=\-@/


,]*



[edit]Stupid HTML tag closer... :laugh:[/edit]


这篇关于如何使用正则表达式验证WebAddress的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆