ebu
08-15-2002, 02:43 PM
Hi there, I need some help.
I am a total novice, and I am writing a v short PERL script to process a text file and add in some XML tags.
The text file contains avalanche reports and also forecasts. A report is 5 or 6 lines of text with the days' report including a string like 'Low (Category 1)' or 'Moderate (Category 2)' ...up to category 5.
There is then a blank line and the forecast for the next day appears. It contains a similar amount of text and also the category string.
My problem is that if I patern match the category string, it matches both the report category and the tomorrows forecast category.
How would I go about just matching one at a time?
Any help gratefully received,
cheers
eb
I am a total novice, and I am writing a v short PERL script to process a text file and add in some XML tags.
The text file contains avalanche reports and also forecasts. A report is 5 or 6 lines of text with the days' report including a string like 'Low (Category 1)' or 'Moderate (Category 2)' ...up to category 5.
There is then a blank line and the forecast for the next day appears. It contains a similar amount of text and also the category string.
My problem is that if I patern match the category string, it matches both the report category and the tomorrows forecast category.
How would I go about just matching one at a time?
Any help gratefully received,
cheers
eb