Regex for non-consecutive upper-case words

后端 未结 5 1075
抹茶落季
抹茶落季 2021-01-14 17:15

Here\'s one for you Regex wizards.

This is for use within Notepad++, i.e. it is entered directly into the search and replace dialog.

I need

5条回答
  •  傲寒
    傲寒 (楼主)
    2021-01-14 17:27

    You can use this pattern:

    (?:[^A-Z]\s+|[^a-zA-Z\s]|\A)\K[A-Z]+\b(?!\s+[A-Z])
    

提交回复
热议问题