Is javascript the best way to remove non-digit characters from the beginning of a line?
-_1234d5fr
should ideally turn into
1234d5fr
str = str.replace(/^\D+/, '');
\D
^
+
What about...
str = str.replace(/^[^0-9]+/, '');
Source: https://habr.com/ru/post/1311544/More articles:What .NET UnmanagedType is Unicode (UTF-16)? - .netHow to build objects based on XML code? - c ++Can a single Python project use 2.x and 3.x code? - pythonFast way to view data in PHP - algorithmSQL Drop Index for different databases - sqlCSS: Why is my floating displayed below nchor in IE6 / 7 but not IE8 / FF - cssIs there a better way to detab (expand tabs) using Perl? - perlWindows Automation GUI - user-interfaceError assigning tr1 :: shared_ptr - c ++Internet Explorer randomly drops sessions between pages in cakePHP - internet-explorerAll Articles