I have this requirement like I need to pass variables to a regular expression like i want to do some validations like a decimal validation for eg.
like I have a decimal number like 1234.123
Here I want the user to enter maximun of 6 integer part and 4 decimal part anything within that is fine.
I can write the regular expression for that.. but like I want to use the same function to validate it accept only 3 integer part and 3 decimal part? I would like to pass arguments like integerpart and decimalpart as the input. So is it anyway possible so that using the same regular expression I can validation multiple decimal formats by passing the integer part and decimal part seperately as validation requirement ?
or is it possible to pass variables in to the regular expression ?
Thanks in advance..