note 46959 added to function.preg-match
| From: | godfather83vn at yahoo dot com dot sg | Date: | Thu, 28 Oct 2004 17:28:32 +0000 |
| Subject: | note 46959 added to function.preg-match | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-79278@lists.php.net to get a copy of this message | ||
Is there a way to get the string matched ? for example: i have a subject as below:
$subject = '<table>
<tr>
<td><img src="Images/anImage.jpg"></td>
</tr>
</table>';
now assume that: preg_match($pattern, $subject); will match the string <img
src="Images/anImage.jpg"> in the $subject, and i want to get it to output to the
screen.
Is there a way or a function in php used to do that ?
----
Manual Page -- http://www.php.net/manual/en/function.preg-match.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+46959
Delete -- http://master.php.net/manage/user-notes.php?action=delete+46959&report=yes
Reason: bad code -- http://master.php.net/manage/user-notes.php?action=delete+46959&report=yes&reason=bad+code
Reason: spam -- http://master.php.net/manage/user-notes.php?action=delete+46959&report=yes&reason=spam
Reason: useless example -- http://master.php.net/manage/user-notes.php?action=delete+46959&report=yes&reason=useless+example
Reason: contains commercial links -- http://master.php.net/manage/user-notes.php?action=delete+46959&report=yes&reason=contains+commercial+links
Reason: useless note -- http://master.php.net/manage/user-notes.php?action=delete+46959&report=yes&reason=useless+note
Reject -- http://master.php.net/manage/user-notes.php?action=reject+46959&report=yes
Search -- http://master.php.net/manage/user-notes.php