0

I have string some like this:

Hello world.THIS is just a sample.TEXT to test. How it looks like

From this string I need to find [dot]+[uppercase word][space] there is no space between dot and uppercase word.

it must check if all characters of the word is capital, not only the first character.

I have this, but incomplete.

\.[A-Z]+
Elyor
  • 5,396
  • 8
  • 48
  • 76
  • 2
    Yes, and what is the problem? It is [matching](https://regex101.com/r/31VA4I/1) `.THIS` and `.TEXT`. Use a capturing group to get the text without `.` - [`\.\s*([A-Z]+)`](https://regex101.com/r/31VA4I/2). Or `(?<=\.)[A-Z]+`. Or `\.\s*\K[A-Z]+` - something from this must help. – Wiktor Stribiżew Sep 20 '17 at 08:06
  • Just add an empty space on the end of the regex. You already have everything else covered... – alesc Sep 20 '17 at 08:08
  • it should check if all characters of the word is capital, not only the first character. @WiktorStribiżew – Elyor Sep 20 '17 at 08:12
  • Like [`\.[A-Z]+\b`](https://regex101.com/r/31VA4I/3)? – Wiktor Stribiżew Sep 20 '17 at 08:14

0 Answers0