I am using regular expression to check number of digits after decimal.
This is working fine when it is used for two or three digits, for example \d{2} or \d{3}, but what if I need to pass a variable instead of 2 and 3?
How do I pass a variable to the pattern? Is it possible?