Added match() with tests.