How to get the number/number at the end of the line?

const name1 = 'windows-x64-pc-anna3'; // (3)
const name2 = 'windows-x64-pc-michael-0012'; // (0012)

const name3 = 'windows-x64-pc-michael-vladimir'; // ()

How to get the number only at the end of the line? If nothing, return null or void.

I have something happened - but all Talitsa on the last example, it will return 64.
June 10th 19 at 15:46
1 answer
June 10th 19 at 15:48
Add the $ in the regular season, note that it is possible to obtain null. For example so.

Find more questions by tags JavaScript