Remove all characters but digits from string – JavaScript

The following regular expression will match for a single character not present in the range between 0 (ASCII 48) and 9 (ASCII 57) (case sensitive).

Meaning it will convert from Test123 to Test.

Reading material

One Response to “Remove all characters but digits from string – JavaScript”

  1. trilok December 30, 2017 at 12:09 pm #

Leave a Reply

Add <code> Some Code </code> by using this tags.