I have some text that could look something like this:
Name is William Bob Francis Ford Coppola-Mr-Cool King-Of-The-Mountain is a fake name.
I would like to run a regular expression against that string and pull out
William Bob Francis Ford Coppola-Mr-Cool King-Of-The-Mountain
as a match.
My current regex looks like this:
/\b((NAME\s\s*)(((\s*\,*\s*)? *)(([A-Z\'\-])([A-Za-z\'\-]+)*\s*){2,})?)\b/ig
and it does most of what I want but it's not perfect. Instead of just getting the name, it is also getting the "is a" following the name like this:
"William Bob Francis Ford Coppola-Mr-Cool King-Of-The-Mountain is a"
What is a regex formula to get only the words starting with a capital letter following the "Name" label and end when the next word starts with a lowercase after a space?
