Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

2
  • Thanks, but I was hoping to just edit the regex so it would work properly. Trying to keep the code change as small as possible. Also, when I click on Run Code Snippet, it shows only 1 decimal place for the first two numbers. Commented Mar 13, 2018 at 17:06
  • @DavidTarvin => I updated my answer to fix the issue where it wasn't showing 2 decimal places. I am not big on Regular Expressions, so I couldn't help there. I just wanted to show an alternative for anyone who lands on this page in the future. An upvote (don't have to accept as the answer) would be helpful. :) Commented Mar 13, 2018 at 17:09