-_1234d5fr
should ideally turn into
1234d5fr
Thank you so much!
-_1234d5fr
should ideally turn into
1234d5fr
Thank you so much!
str = str.replace(/^\D+/, '');
\D
stands for non-digit characters^
matches the position before the first character in the string+
is "one or more of"