help - parsing text file

From: Date: Wed, 04 Apr 2001 18:51:36 +0000
Subject: help - parsing text file
Groups: php.general 
Request: Send a blank email to php-general+get-47124@lists.php.net to get a copy of this message
arg - i' at wits end. i need to parse a text file into a mysql insert statement. the statement isn't the problem its parsing the text file. heres a sample of the file West Chesterfield (603) 256-8278 V.90 (603) 307-2100 V.90 & K56flex (603) 307-2200 ISDN / DOV Hinsdale336 West Chesterfield256, 307, 614 Westmoreland399 Brattleboro, VT(802) 251, 254, 257, 258, 451 Jacksonville, VT(802) 368, 659 Newfane, VT(802) 221, 365 Putney, VT(802) 387, 536 Williamsville, VT(802) 348 Wilmington, VT(802) 464 i need to get the town the number is located (west chesterfield in this case) the 2 numbers (V.90 and ISDN - there may be more but i only need one of each),town(state), and the number. I'm still struggling with rexexp expressions...and just can't seem to hack this one around. I'm not opposed to perl.....:-) can ANYONE offer any help? ~kurth

« previous php.general (#47124) next »