I have this RegEx that captures a few groups:
VAN - H.Sedin (D.Sedin, A.Edler)
^(\w+)\s-\s(?P<goalscorer>.+)\s\((?P<assist1>.+),\s(?P<assist2>.+)\)$
goalscorer = H.Sedin
assist1 = D.Sedin
assist2 = A.Edler
I want to make it so that if theres a whitespace at the end of the line, it still captures it, as sometimes there might be one at the end of the line.
I tried doing a bunch of things, most recently:
^(\w+)\s-\s(?P<goalscorer>.+)\s\((?P<assist1>.+),\s(?P<assist2>.+)\)$|\)\s+$
But I can't get it to capture groups now.
Here's a live link to test it: