Extracting data in Perl with regular expressions…?

I am trying to read all latitude and longitude values from NWS warning files like this: http://www.weather.gov/data/SGF/SVRSGF

The latitude/longitude values always appear at the bottom of the warning, between "LON" and "TIME". I had been using the regular expression: $stwarn =~ m/LON(.*)\nTIME/ but it doesn’t seem to work for all warnings.

Can anyone offer any better suggestions? Thanks!

Comments

  1. Doug V says:

    That’s probably because there’s not always a newline (\n) between the two, or it might sometimes be a carriage return (\r) instead of a newline. Try removing the newline character, or using an alternating expression for newline or carriage return.

legitimate work from home jobs | Event Planning Bay Area | rent video games | Homeloans | Plumbing Courses in Manchester | increase fertility | Green Drink | Photo Keyring | Vitamin D Deficiency Symptoms | skip bags | Order Fulfillment Software | virtual receptionist | Educators Credit | bodybuilding workouts | window cleaning
Poker Software