I know I can parse out the int by doing
parseInt($('#count_of_stations').html())
if the value is like this “2stations” that will return 2 but now I need to get the integers out in this format
one1
two2
three3
four4
five5
How do i get just the number out
If the number will always be 0-9, you can use slice() with a negative offset:
Alternatively, if the start of the string upto the number will always be the same, you can use slice() with a positive offset:
If those first two suggestions don’t meet your requirements, you can use match() with a regular expression: