How to create a method which will find a number in String Text. I contain List of Strings which contain text like:
Radius of Circle is 7 cm
Rectangle 8 Height is 10 cm
Rectangle Width is 100 cm, Some text
Now I have to find all the number in these lines which are coming before cm so that I don't mistakenly find any other number.
How can it happen