Fix #1 by adding a regex for label matching and adding more tests.