note 63356 added to function.preg-match

From: Date: Tue, 21 Mar 2006 06:56:27 +0000
Subject: note 63356 added to function.preg-match
Groups: php.notes 
Request: Send a blank email to php-notes+get-106132@lists.php.net to get a copy of this message
This little function is self-explaining. function preg_match_between($a_sStart, $a_sEnd, $a_sSubject) { $pattern = '/'. $a_sStart .'(.*?)'. $a_sEnd .'/'; preg_match($pattern, $a_sSubject, $result); $pattern = '/'. $a_sStart .'/'; $result = preg_replace($pattern, '', $result[0]); $pattern = '/'. $a_sEnd .'/'; $result = preg_replace($pattern, '', $result); return $result; } ---- Server IP: 66.207.199.35 Probable Submitter: 24.37.48.240 ---- X-Spam-Status: No, hits=3.1 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER autolearn=no version=2.64 ---- Manual Page -- http://www.php.net/manual/en/function.preg-match.php Edit -- http://master.php.net/note/edit/63356 Del: integrated -- http://master.php.net/note/delete/63356/integrated Del: useless -- http://master.php.net/note/delete/63356/useless Del: bad code -- http://master.php.net/note/delete/63356/bad+code Del: spam -- http://master.php.net/note/delete/63356/spam Del: non-english -- http://master.php.net/note/delete/63356/non-english Del: in docs -- http://master.php.net/note/delete/63356/in+docs Del: other reasons-- http://master.php.net/note/delete/63356 Reject -- http://master.php.net/note/reject/63356 Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#106132) next »