Answers for "js for to find number from string"

5

js get number from string

thenum = "foo3bar5".match(/\d+/)[0] // "3"
Posted by: Guest on January-08-2021
0

javascript find number in string

the regular expression on looks for the first number character in the string

let numberInString = theString.match(/\d+/[0];
Posted by: Guest on November-27-2021

Code answers related to "js for to find number from string"

Code answers related to "Javascript"

Browse Popular Code Answers by Language