I have a string like
String test="top 10 products";
String test2="show top 10 products";
Is there a way to check if the word "top" has a number following it. If yes get that number to another string.
I'm thinking to use indexOf("top") and add 4 to that and try to get the next word. Not sure how it will work. Any suggestions?