Makes it possible to get regex matches as a list in RegexStage.

Instead of merging all matches into a single string it is now possible to get the matches as a list. I also found some bugs and added tests for them.