Hi,
$INPUT=' MAX SUSTAINED WINDS 65 KT WITH GUSTS TO 80 KT. 64 KT....... 25NE 0SE 0SW 25NW. 50 KT....... 40NE 0SE 0SW 40NW 40NE 0SE 0SW 40NW. 34 KT.......100NE 75SE 0SW 75NW. 12 FT SEAS..175NE 100SE 50SW 175NW. REPEAT...CENTER LOCATED NEAR 17.0N 77.5W AT 11/2100Z '; $cnt=1; $INPUT=~s#MAX SUSTAINED WINDS(.+?)REPEAT#Match($1)#egs; sub Match { my ($line)=@_; while ($line=~m#[0-9]+NE [0-9]+SE [0-9]+SW [0-9]+NW#g) { push (@OUT, $&); } return $line; } $"="\n"; print "@OUT";
Thanks,
Gopal.R
In reply to Re: Need soom regex expertise
by gopalr
in thread Need soom regex expertise
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |