字符串解析错误 [英] string parsing error
本文介绍了字符串解析错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在数据绑定验证时使用以下代码时出现异常。
if (Regex.IsMatch (Convert.ToString( value ), ^(选择)([a-zA-Z0-9 _,])+(from)+([a-zA-Z0-9 _,])* $))
{
return true ;
}
以下例外情况:
解析^(选择)([a- zA-Z0-9 _,])+(来自)+([a-zA-Z0-9 _] * $ - 还不够。
帮帮我。
提前感谢。
解决方案
))
{
返回 true ;
}
以下异常:
解析^(选择)([a-zA-Z0-9 _,]] +(从)+([a-zA-Z0-9_] *
- 还不够。
帮助我。
提前感谢。
错误表示它所说的内容,并且错误表明正在解析的字符串中缺少最后一个。错误显示与您粘贴的代码不同的字符串。
I got exception when m using below code on databinding validation.
if (Regex.IsMatch(Convert.ToString(value), "^(select) ([a-zA-Z0-9_, ])+ (from) +([a-zA-Z0-9_, ])*$"))
{
return true;
}
throughs below Exception:
parsing "^(select) ([a-zA-Z0-9_, ])+ (from) +([a-zA-Z0-9_]*$" - Not enough )'s.
Help me.
thanks in advance.
解决方案
")) { return true; }
throughs below Exception:
parsing "^(select) ([a-zA-Z0-9_, ])+ (from) +([a-zA-Z0-9_]*
" - Not enough )'s.
Help me.
thanks in advance.
The error means what it says, and the error indicates that the last ) is missing from the string being parsed. The error shows a different string to the one you pasted as your code.
这篇关于字符串解析错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文