RE: [PHP] search for string and break it out

From: Date: Fri, 17 Nov 2000 01:05:03 +0000
Subject: RE: [PHP] search for string and break it out
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-25830@lists.php.net to get a copy of this message
Not tested, but something like this is what you want. eregi("(sentto:).*\"", $line, $match); $line is the line that you read in. $match will be an array of matches. More info at: http://www.php.net/manual/function.eregi.php Jason Stechschulte jpstech@nc.edu -----Original Message----- From: Chuck Barnett [mailto:xobyte@bellsouth.net] Sent: Thursday, November 16, 2000 4:22 PM To: PHP General List Subject: [PHP] search for string and break it out Hi. I am wanting to read a file using fread. I want to search for string "sentto:" then I want to read everything after sentto until the first double quote. What would be the correct way to do this? would you use strstr to find sentto? then try and count the number of chars to the dbl quot and use substr to get the value? Thanks Chuck -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#25830) next »