--=-Nr+wK7xKpthMjp1XFSw+ Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Here's my PHP script that will generate a CSV file from your data in FILE. I've tested it on the data you sent and it does work. Also, make sure there are no line breaks in the lines or that may break things. On Wed, 2003-03-26 at 14:49, David A. Sinck wrote: > \_ SMTP quoth Mike Starke on 3/26/2003 16:33 as having spake thusly: > \_ > \_ David is right, I probably should have included more accurate > \_ data than my original message. > \_=20 > \_ Here is a line: > \_ --------------------------------------------------- > \_ TYPE: AL ADHC, SUBTYPE: ADULT DAY HEALTH CARE, ID: AL2905, LICENSE: AD= HC-2838, NAME: MARY'S PLACE ADULT DAY CENTER, LEGALLY: MARY'S PLACE ADULT D= AY CENTER, ADDRESS: 14601 DEL WEBB BLVD, CITY: SUN CITY, STATE: AZ, ZIP: 8= 5351, TELEPHONE: (623)584-4999, FAX: , CAPACITY: , COUNTY: MARICOPA > \_ --------------------------------------------------- >=20 > $line =3D qq{TYPE: ... from above ... }; >=20 > my @parts =3D split /, (\w+): /, $line; > splice @parts, 0, 1, split /:/, $parts[0], 2; > my %info =3D @parts; >=20 > foreach (sort keys %info) > { > print "$_ =3D> $info{$_}\n"; > } >=20 > YMMV. Yes, the splice is masking a weakness in the RE. :-) >=20 >=20 > David > --------------------------------------------------- > PLUG-discuss mailing list - PLUG-discuss@lists.plug.phoenix.az.us > To subscribe, unsubscribe, or to change you mail settings: > http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss --=20 Bryce C CoBryce Communications --=-Nr+wK7xKpthMjp1XFSw+ Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQA+giX1/wbq/C6yyPcRAquZAKCojFWBn1A5s+pyJHHBjWGO8kBqQgCbBMPZ HeP1W5JPWMssNgQJQFminxE= =X2Q4 -----END PGP SIGNATURE----- --=-Nr+wK7xKpthMjp1XFSw+--