> users: username "username with spaces" anotherusername > > I need to parse that into a structure like > $users = array( > 'username', > 'username with spaces', > 'anotherusername' > );
try preg_match i think the expression could look something like this: '/users:\s*(^\s+)"(.*)"\s*(.*)\n/' this should let you get 'username' in $1 'username with spaces' in $2 'anotherusername' in $3 i didnt test it, but it could work :-) -- Wolfram -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php