开发者

How to restrict the lower case words as well on a regex that is been using [closed]

It's difficult to te开发者_如何学Cll what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 11 years ago.

This is an extension to earlier question Regex which restricts all required but not lower case ones like ' su moto' Can we modify to restrict the lower case word of the same Thanks.

EDIT whoa rubbed the wrong shoulders !!! Actually the question is straight I need to restrict for word

SU MOTO in my application.For that I am using the regex '^\\s*SU\\s*MOTO\\s*$'.This works fine but lower case is still a problem.

Can someone help me with this


Like this?

(?-i)^\s*SU\s*MOTO\s*$

Will match SUMOTO, but not sumoto.


#([A-Z0-9_-]*)#

That will catch all uppercase letters, numbers, underscore and dash.

I'm not really sure what you're trying to say.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜