Use match() instead of test()