Can someone explain to me what the following regex is doing in javascript? I know it only allows for two decimal places but I'm very confused on the multiple "\d" and "." and "\^d." expressions.
Regex expression: this.value = this.value.replace (/(.\d\d)\d+|([\d.]*)[^\d.]/, '$1$2');
Original StackOverflow question here: Allow only 2 decimal points entry to a textbox using javascript or jquery?