EnzoValenzetti:Sorry, but I don't understand, I'm using Java. I'd like to got only :
Status
23.4
Then use replaceAll(...) to remove all the unwanted stuff.
EnzoValenzetti: Using your previous regexp I got only:
Status
10-days prognosis
New Status
FUNDAMENTAL DRIVEN CO2 INDEX FROM 1. JANUARY 2008, LAST 30 DAYS
EUA 2008 [?/t] EEX month ahead [?/MWh]
EUA 2009 [?/t] UK Power Mth ahead [?/MWh]
EUA 2010 [?/t] Brent Mth ahead [$/barrel]
EUA 2011 [?/t] EUR/USD
CER 2008 [?/t]
CER 2009 [?/t]
-2.6
Status
10-days prognosis
New Status
FUEL PRICE DRIVEN CO2 INDEX FROM 1. JANUARY 2008, LAST 30 DAYS
Status
Change
1
10.5
Well, that's what you asked: match the first decimal number after the string "Status". The string "10.5" is now stored in group 1. Use replaceAll(...) and place that group in the second parameter of the replaceAll method. Try a couple of things: that's the best way to get familiarized with Java/regex.
Run this small demo to see if you can apply it in your situation:
String s = "a=11, b=22, c=33";
System.out.println(s.replaceAll(".*?b=(\\d+).*", "group 1 = $1"));
EnzoValenzetti: And another question is: what does it mean "(?si)" ?
Kind regards
(?si) is short for both (?i) and (?s).
See what they mean in the Pattern API docs:
http://java.sun.com/j2se/1.5.0/docs/api/java/util/regex/Pattern.html
Search for "(?s)" and "(?i)"