Regular Expression for UpperCase Letters In A String

前端 未结 8 1456
野性不改
野性不改 2021-02-20 03:15

For the life of me, I can\'t figure out why this regular expression is not working. It should find upper case letters in the given string and give me the count. Any ideas are we

8条回答
  •  死守一世寂寞
    2021-02-20 03:43

    Your pattern as you've written it looks for 1 or more capital letters between the beginning and the end of the line...if there are any lowercase characters in the line it won't match.

提交回复
热议问题