Hi Luigi,
Thanks for your question.
The Masking Engine uses regular expressions (RegEx) to find matching patterns in the data. This applies to both the column name (Column Level) and at the data in the column (Data Level). RegEx uses fixed expression and as such can't cater fro dynamic expressions - i.e. including a calculation of formula (arithmetic or string). To do this kind of validations you may need to use a SQL statement or another tool.
I hope this answer the question.
Kind regards,