I have a scenario where I have multiple items with similar titles and need to simplify the titles so that they each have an identical manifest title.
Here are possible variations:
Quarter Final Football vs. Loyola #2 -- 46:00
Quarter Final Football vs. Loyola #1 -- 32:00
Little Shop Act II -- 39:30 -- 5/22/91
Little Shop Act I -- 56:15 -- 5/22/91
B-BALL -- 3/14/86 -- vs. King -- First Half -- 43:15
B-BALL -- 3/14/86 -- vs. King -- Second Half -- 48:15
Oak Park 9/26/70 Part 1
Oak Park 9/26/70 Part 2
vs. Yale (1958) First Period
vs. Yale (1958) Second Period
The matching result would ideally be "vs. Yale (1958)" for the bottom two. I tried with the bottom string with this regex pattern, but am feeling a bit lost as to how to handle all these variations programatically.
([.,a-zA-Z0-9\s\(\)]*)\b([#]|Period|period)\b
Thanks for any direction or help.
Edited: Output for each variation-
Quarter Final Football vs. Loyola
Quarter Final Football vs. Loyola
Little Shop
Little Shop
B-BALL -- 3/14/86 -- vs. King
B-BALL -- 3/14/86 -- vs. King
Oak Park 9/26/70
Oak Park 9/26/70
vs. Yale (1958)
vs. Yale (1958)