How to get index of the first digit in String

Search: [Fastest way]

var str = "asdf1";
var search = str.search(/\d/)
console.log(search);

Match: [Slower than a for loop, just showing another way of doing it]

var str = "asdf1";
var match = str.match(/(\D+)?\d/)
var index = match ? match[0].length-1 : -1;
console.log(index);

firstDigit = 'Testi2ng4'.match(/\d/) // will give you the first digit in the string
indexed = 'Test2ing4'.indexOf(firstDigit)

Well I guess I need to look at my methods more closely, you can just do 'Testin323g'.search(/\d/);