Question: I am trying to build a script that should give you a list of the proper names of a text. I want to build a regular expression that matchs every word that starts with a capital letter and that doesn't start a stence. An example from the text:

> 
> "But while he thought about these things, behold, an angel of the Lord
>  appeared to him in a dream, saying: Joseph, son of David, do not be
>  afraid to take to you Mary your wife, for that which is conceived in
>  her is of the Holy Spirit. She is going to have a son. You must give him the name Jesus. That’s because he will save his people from their sins.
> 
> 
> 

I want that the regexp matches: "Lord", "Joseph", "David", "Mary", "Holy" and "Spirit". It should not match "But", "She", "You" or "That". So I did this:

```
[a-z,;:] +([A-Z][a-z]+)[\W]

```

This matchs Lord, Joseph, David, Mary and Holy, BUT not Spirit. And that is my problem: after finding "Holy", the regexp keeps going searching in the text the pattern; to find "Spirit", the regexp should take the "y" of "Holy" in consideration for the first square bracket. So, after finding "Holy" should restart not after "Holy". I have tried it also with non matching groups, like:

```
(?:[a-z,;:]) +([A-Z][a-z]+)[\W]

```

But that is also not the answer. I would be very thankful if anyone would help.
Regards!

Answer: 
Regex

```
(?<=[a-z,;:] )([A-Z][a-z]+)

```

[Demo](https://regex101.com/r/mK8fO2/7)

Output:

```
MATCH 1
1.  [65-69] `Lord`
MATCH 2
1.  [106-112]   `Joseph`
MATCH 3
1.  [121-126]   `David`
MATCH 4
1.  [160-164]   `Mary`
MATCH 5
1.  [221-225]   `Holy`
MATCH 6
1.  [226-232]   `Spirit`

```
You can try 

```
(?<![.!?;]) ([A-Z]\w+)

```

[demo](https://regex101.com/r/lU9gT0/1)