I am using this RegEx:
\s*((\w*\.*\s*)+[.*(\w)]+(?=\d{4}))(\d{4}\s*\,)*
And the goal is to match words with the last one that ends with a dot, follower with 4 digits ending with a comma.
This is a test.2014,
And it works fine. Now, I would like to add the possibility to have a whitespace (\s) between the "test." and "2014,", but the whitespace is not a mandatory parameter, it should be matched if there.
Could you please help me on how to add that to my regex? How can we set not mandatory parameters ?
Thank you.
[.*(\w)]+doesn't match what you think it does.......or(.*(()...