I need part of a word. For e开发者_如何学运维xample if we have "CheckResults"
I just want to get "Check"
. Can someone help me with regex for this?
\b[A-Z][a-z]+
Finds the begining of a word and then matches until the end of the word or a capital letter. If the word won't always be capitalized, use this:
\b[A-Z]?[a-z]+
精彩评论