Updated regular expression to fix dynamic decimal precision