【发布时间】:2013-12-20 05:42:33
【问题描述】:
我想要time 单词和[]{}^ 的正则表达式,那些字符串格式不允许在字符串中。
喜欢,
testtime -> allowed
tim etest -> allowed
thetimetest -> allowed
the time test -> not allowed
test[my -> not allowed
my}test -> not allowed
test^time -> not allowed
我为字符串中不允许的单词开发下面的正则表达式。但他们无法在c# 中检查是否区分大小写。
^((?!Time)[^[\]{}])*$
【问题讨论】: