How to restrict the lower case words as well on a regex that is been using [closed]
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.
精彩评论