I have a string as below
"Temporada 2015"
and also I get string as
"Temporada 8"
I need to match and extract only numbers from the string 2015 and 8. How do i do it using regex. I tried like below
doc.text_at('header.headerInfo > h4 > b').match(/(Tempo).*(\d+)/)[2]
But it returned only 5 for first one instead of 2015. How do I match both and return only nos.??