Hey Ars,
I have a set of floating point numbers that I would like to extract from the following line:
AAA 27.9 BBB -47.89 CCC 3.2 DDD 478.345
I've pieced together the following regular expression (Corrected version ((\-*[\d\.]){3}) )but it will only match 27.9 and then stop. Using only a regular expression how would you match just the first 3 numbers (27.9, -47.89 and 3.2)?
Any advice would be greatly appreciated.
-M
I have a set of floating point numbers that I would like to extract from the following line:
AAA 27.9 BBB -47.89 CCC 3.2 DDD 478.345
I've pieced together the following regular expression (Corrected version ((\-*[\d\.]){3}) )but it will only match 27.9 and then stop. Using only a regular expression how would you match just the first 3 numbers (27.9, -47.89 and 3.2)?
Any advice would be greatly appreciated.
-M