Sorry new here,
i want to extract integers from a string which I can't predict, I don't know the best way about going about it for instance I know you can split but how do I know where to split if its a random string
Following the number will always be a "ab" and before the numbers will be a close tag as it is hyper text string
example random string: "furhhrudjdirhdudhrudehdugysetsgduhicfiffhnthuddhrb the buck ehrhebheb rhedhd ignored he urufnrufendheh rubrhhdndhfh >4.4 ab dedbehdjsnsbwhsh >10.1 ab didn't >1.2 ab"
in this example I'd want to extract {4.4, 10.1, 1.2}
(the numbers will never be more than 50)
What I think the best method to do is to somehow use positions and the ASCII of ab and the ASCII of > to isolate the numbers in between however there is multiple numbers so these would have to be moved to a list.
sorry if I haven't been clear enough! But hope you get the drift
i want to extract integers from a string which I can't predict, I don't know the best way about going about it for instance I know you can split but how do I know where to split if its a random string
Following the number will always be a "ab" and before the numbers will be a close tag as it is hyper text string
example random string: "furhhrudjdirhdudhrudehdugysetsgduhicfiffhnthuddhrb the buck ehrhebheb rhedhd ignored he urufnrufendheh rubrhhdndhfh >4.4 ab dedbehdjsnsbwhsh >10.1 ab didn't >1.2 ab"
in this example I'd want to extract {4.4, 10.1, 1.2}
(the numbers will never be more than 50)
What I think the best method to do is to somehow use positions and the ASCII of ab and the ASCII of > to isolate the numbers in between however there is multiple numbers so these would have to be moved to a list.
sorry if I haven't been clear enough! But hope you get the drift