正则表达式问题...... [英] Regular Expressions Issue...

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

问题描述

大家好......我准备通过带有正则表达式的客户端javascript来完成一个经过验证的表单......是的,表单也将在服务器端验证...无论如何,我的正则表达式代码是有问题的,我想知道是否有人知道正则表达式真的可以看看它并告诉我是什么问题。

hi everyone... i''m preparing to complete a validated form through client-side javascript with regular expressions... and yes the form will also be validated server-side as well... anyway, my regex code is problematic, and i was wondering if someone who know about regular expressions really well could have a look at it and tell me what is the problem.

展开 | 选择 | Wrap | 行号

推荐答案

不看正则表达式,为什么要验证这个数据2x?我使用Javascript来验证我的Web表单的原因是为了保持客户端计算机上的负载而不是服务器。
Without looking at the regex, why are you validating this data 2x? The reason I use Javascript to validate my web forms is to keep the load on the client machine not the server.


你需要两个锚,你只使用一个。

两个锚点是^和
You need two anchors, you are only using one.
The two anchors are ^ and


,^是起始锚点和


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

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