正则表达式提取名称列表

时间:2016-06-22 04:44:59

标签: regex

我几乎完整的正则表达式,但没有捕获"导演Nicolas Winding Ref",感谢任何帮助

Desired rotation  Uses image  Actual rotation
----------------  ----------  ---------------
         0          upright            0
        45          tilted             0
        90          upright           90
       135          tilted            90
       180          upright          180
       225          tilted           180
       270          upright          270
       315          tilted           270

正则表达式:

: 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

documentation

1 个答案:

答案 0 :(得分:1)

认为你想要这样的东西,

: ([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]*)*))?

DEMO