Changing regex generation to provide for sharper relevance checks