Thank you for the possible solution Choroba! I tried it and it works. It looks like the non-capturing group prevents the last successfully matched regular expression from being used when the pattern is empty.
"It's not how hard you work, it's how much you get done."