in reply to Re^2: weather fetching script
in thread weather fetching script
Anyway, this is easy to get around. Given that you aren't interested in the minimums, you can simply alter the pattern match on line 40 to read as follows:
if ($line =~ /^([\w\s]+):.*?Max\s+(\d+)/) {
The change is that we include a non-greedy .* to skip over anything until it reaches "Max".
With that change (and the current content as at 9:30PM CST), I get:
var adeldesc = Fine and cool with increasing high cloud. Moderate eas +t to northeast winds. var mtbkmax = "9" var noarmax = "11" var adelmax = "10" var elizmax = "11"
Cheers,
Darren :)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: weather fetching script
by pip (Novice) on Jul 14, 2006 at 05:50 UTC | |
by McDarren (Abbot) on Jul 14, 2006 at 06:16 UTC | |
by pip (Novice) on Jul 14, 2006 at 07:29 UTC | |
by pip (Novice) on Jul 25, 2006 at 02:10 UTC | |
by McDarren (Abbot) on Jul 25, 2006 at 03:38 UTC | |
by pip (Novice) on Jul 25, 2006 at 07:36 UTC |