I'm missing a really obvious thing here, but I'm new to regex so be kind ;-)
I have a number of films in an arbitrary format that may or may not have the year attached.
My Movie Name 2010
Some.Other.Super.Cool.Movie
The~Third|Movie.2010
Now, using (.+)\W(\d{4})
I can extract the two movies with dates into two groups one containing the name and the other the year, but the middle one gets ignored? I'm just a little unsure on how to actually make the year segment optional.
Ideally, ;-), I could use a single expression to return the names with \W converted into spaces but that a different conversation.
Thanks in advance