I am trying to get the digits before and after a specific word using regular expression.
Suppose the string i want to test is
"Started walking 8 hours 9"
I want to get both the numbers 8 and 9 between hours. Please don't mind the grammar of the sentence it is just for an example.
Help is much appreciated. Thanks.