Reputation: 680
I have almost complete regex, but does not capture "director Nicolas Winding Ref", appreciate any help
: Actor Keanu Reeves attends
: Actors Keanu Reeves, Alessandro Nivola, Christina Hendricks, Bella Heathcote, Elle Fanning and director Nicolas Winding Refn attend
: Actresses Bella Heathcote, Elle Fanning and Christina Hendricks attend
regex:
: {1}([A-Za-z\. \-,]*?) (?!and)[a-z]
https://www.debuggex.com/r/i8yEYRXVhlf9TzQL
Upvotes: 0
Views: 67
Reputation: 174706
Think you want something like this,
: ([A-Z][a-z]*(?: [A-Z][a-z]*)*(?:, [A-Z][a-z]*(?: [A-Z][a-z]*)*)*)(?: and(?: \w+)? ([A-Z][a-z]*(?: [A-Z][a-z]*)*))?
Upvotes: 1