I am new to this community and would like to ask a question. I am going crazy to select with RegEx "only" the names of the characters. See the example below. How can I do this? Thank you very much!
JOHN
I am the first character to speak and I would like someone to answer me!
CLARE
Here I am, I'm right in front of you.
ROBERT
I'm there, too. Didn't you see me?
CodePudding user response:
Try this:
^[A-Z]{2,}$
^
Go to the start of each line.
[A-Z]{2,}
match at least two or more capital letters.
$
ensures it is the end of the line.
See regex demo.