RE: [PHP-DB] Grabbing string between two other strings.

From: Date: Sat, 30 Jun 2001 05:28:14 +0000
Subject: RE: [PHP-DB] Grabbing string between two other strings.
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-9985@lists.php.net to get a copy of this message
the ends will not always be the same - they will be pieces of html code tho - ie. <font face=verdana size=2>... I am having a bit of trouble because the ereg function only finds the FIRST result even though the docs refer to matchES [as in more than one]. So. i think that the preg_match_all() looks most promising, however i have not had any luck as yet. thanks much, olinux --- "Jesse S. Williams" <jesse.williams@141.com> wrote: > Hello- > > Try looking at the info for regular expressions on > http://www.php.net. You > should be able to write something from that. Will > the beginning and end > always be the same? If so that's easy. If not, > what arguments are you > going to be using to determine what part is the > "middle" to pull out? > > > Jesse Williams > System Administrator > DowNET VoIP Team > Electronic Data Systems > > > > > -----Original Message----- > From: olinux [mailto:olnx@yahoo.com] > Sent: Thursday, June 28, 2001 9:51 PM > To: php-db; phplearers@yahoogroups.com > Subject: [PHP-DB] Grabbing string between two other > strings. > > > Hey all. I am searching for a function that will > return a string that is > between two other strings: > > For example: > The end result is: $text is 'This is the text I > want' > > Here is the beginning string. > <font face="arial">This is the text I want</font> > > The function would take something like > ($name_of_result_between_two_strings, > $first_string, $second_string) > > Is there such a function? > > Thank you, > olinux > > > _________________________________________________________ > Do You Yahoo!? > Get your free @yahoo.com address at > http://mail.yahoo.com > > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, e-mail: > php-db-unsubscribe@lists.php.net > For additional commands, e-mail: > php-db-help@lists.php.net > To contact the list administrators, e-mail: > php-list-admin@lists.php.net > > __________________________________________________ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail http://personal.mail.yahoo.com/

« previous php.db (#9985) next »