How to get index of the first digit in String
javascript, regex
Solution
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/)`;
Problem
I need to find out how to get the index of the first digit in String. I have an idea how to do that using some loops but it would be really ugly so I would prefer some regex. Could someone give me a clue how to do that using regex?