not sure what you are trying to do, but I think your code example doesn't contain any errors.
if you want to check if a value matches a given pattern (you want to get a boolean result), there's already one macro in the standard library for that:
if that's not what you mean, please be more specific or add more examples to clarify what problem you are trying to solve.