Tests for everything but (non-)capture groups
Test for capture groups w/o backreferences
Tests for capture groups with backrefs
Minor refactor in tests