Q:

Regex pattern to match a word based on previous and next word?

I am trying to highlight a word based on the previous and next word matching with specific customer requirements.
A word should be highlighted only when previous and next word doesn't start with CAPS.
I have created regex "(?!\bA-Z\b)\sSouls+(?!\s[A-Z,0-9])" but it's also highlighting "Souls" with previous word that starts with capital.
https://regex101.com/r/wPmijX/2
In this case, "Souls" next to "Dark" should not be highlighted as it starts with caps. Only "Souls" in the second paragraph should be highlighted. Event "Souls" in the third paragraph should not be highlighted as "Game" start with capital letter.

A:

Try Regex: (?<=\b[a-z]\w+\b \b)Souls(?=\b [a-z]\w+\b)
Demo

