正则表达式移动条件验证asp.net中的已发布问题 [英] regular expression Mobile condition Validation Releated problem in asp.net
问题描述
ValidationExpression =^ [0 {10,}] | [1 {10,}] | [2 {10,}] | [3 {10,}] | [4 {10,}] | [5 { 10,}] | [6 {10,}] | [7 {10,}] | [8 {10,}] | 9 {10,} | [0-9] {10,12}
Ex:-9720077967
这个进入
但是8791167545
不能输入
表示
条件无效。
ex有效becoz 9 {10,}此写如果[8 { 10,}]和9相同
任何数字都不能进入这个文本框。
plz help解决这个问题。
你期望做什么?
因为它没有这样做,我很确定...
[0 {10,}]匹配此列表中的任何一个字符:
< pre lang =text> 0
}
1
0
,
}它不匹配的是10个零。那就是:
0 {10,}
同样,
< pre lang =text> [1 {10,}]将不匹配10个......
我有点儿对于你想要接受的内容感到困惑,所以我可以建议替换,但我强烈建议你获得的副本Expresso [ ^ ] - 它是免费的,它会检查并生成正则表达式。看起来你需要它......
ValidationExpression="^[0{10,}]|[1{10,}]|[2{10,}]|[3{10,}]|[4{10,}]|[5{10,}]|[6{10,}]|[7{10,}]|[8{10,}]|9{10,}|[0-9]{10,12}"
Ex:-9720077967
this one enter
but 8791167545
not enter
it means
condiiton not valid.
ex is valid becoz 9{10,} this write if [8{10,}] same as 9 then
any number not enter this text box .
plz help solve this problem.
What do you expect that to do?
Because it doesn't do it, I'm pretty sure...
[0{10,}]Matches any one character in this list:
0 } 1 0 , }What it does not match is 10 zeros. That is:
0{10,}
Similarly,
[1{10,}]will not match 10 ones...
I'm a little confused as to what you are trying to actually accept, so I can;t suggest a replacement, but I would strongly suggest you get a copy of Expresso [^] - it's free, and it examines and generates Regular expressions. It look like you need it...
这篇关于正则表达式移动条件验证asp.net中的已发布问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!