YARQ - Yet another regex question
From: sjp (salvador_at_progressivetrail.org)
Date: 03/29/05
- Next message: A. Sinan Unur: "Re: YARQ - Yet another regex question"
- Previous message: Paul Lalli: "Re: Performance question"
- Next in thread: A. Sinan Unur: "Re: YARQ - Yet another regex question"
- Reply: A. Sinan Unur: "Re: YARQ - Yet another regex question"
- Reply: Paul Lalli: "Re: YARQ - Yet another regex question"
- Reply: Fabian Pilkowski: "Re: YARQ - Yet another regex question"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 29 Mar 2005 18:37:50 GMT
Hi folks,
I'm parsing through a series of delimited records. Some of the records
use '\t' for the delimiter, and others use '=09' as the delimiter. My
program handles the tab-delimited records fine, but records that use '=09'
have erroneous line breaks after '=' signs, like so:
93=093=094/1/2004=09=09HARNEY=09JAMES=09808 SITKA AVE=09=09NEWBERG=09OR=099=
71320000=098.33=09I=09CA=09PARK RANGER=09=0966.64=09=09=09=09=09=09PARKS & =
RECREATION DIVISION=09
I'd like to remove the '=' and EOL, but 'Sline =~ s/\=\n//g;' fails with
an "Can't modify constant item in substitution (s///) at
/usr/local/bin/mailparse line 18, near "s/\=\n//g;" error
What is the proper way to do it?
Thanks,
SJP
- Next message: A. Sinan Unur: "Re: YARQ - Yet another regex question"
- Previous message: Paul Lalli: "Re: Performance question"
- Next in thread: A. Sinan Unur: "Re: YARQ - Yet another regex question"
- Reply: A. Sinan Unur: "Re: YARQ - Yet another regex question"
- Reply: Paul Lalli: "Re: YARQ - Yet another regex question"
- Reply: Fabian Pilkowski: "Re: YARQ - Yet another regex question"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|