Regular expression for not extracting those with spacing

Viewed 33
RangersIslandersDevils
KingDucks
Sharks
Blackhawks
Red Wings

How do I extract the following using regex?

Rangers
Islanders
Devils
Kings
Ducks
Sharks
Blackhawks
Red Wings

Basically those with spacing remains the same.

Patterns that I have tried that don't work:

[A-Z][a-z]+[^\s]
[A-Z][a-z]+[^\s]$
[A-Z][a-z]+[\s][A-Z][a-z]+|[A-Z][a-z]+

THANKS ALL I GOT IT!

1 Answers

I think this pattern will match the Red Wings [A-Z][a-z]+( [A-Z][a-z]+)?

Related