note 63934 deleted from function.preg-match by colder

From: Date: Mon, 18 Jun 2007 18:29:40 +0000
Subject: note 63934 deleted from function.preg-match by colder
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-127622@lists.php.net to get a copy of this message
Note Submitter: martin at kouba dot at ---- in reply to "brodseba at brodseba dot com" hmm, wouldn't it be much easier to do it this way? function preg_match_between($a_sStart, $a_sEnd, $a_sSubject) { $pattern = '/'. $a_sStart .'(.*?)'. $a_sEnd .'/'; preg_match($pattern, $a_sSubject, $result); return $result[1]; }

« previous php.notes (#127622) next »