note 46960 added to function.preg-match

From: Date: Thu, 28 Oct 2004 17:30:01 +0000
Subject: note 46960 added to function.preg-match
Groups: php.notes 
Request: Send a blank email to php-notes+get-79279@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+46960 Delete -- http://master.php.net/manage/user-notes.php?action=delete+46960&report=yes Reason: bad code -- http://master.php.net/manage/user-notes.php?action=delete+46960&report=yes&reason=bad+code Reason: spam -- http://master.php.net/manage/user-notes.php?action=delete+46960&report=yes&reason=spam Reason: useless example -- http://master.php.net/manage/user-notes.php?action=delete+46960&report=yes&reason=useless+example Reason: contains commercial links -- http://master.php.net/manage/user-notes.php?action=delete+46960&report=yes&reason=contains+commercial+links Reason: useless note -- http://master.php.net/manage/user-notes.php?action=delete+46960&report=yes&reason=useless+note Reject -- http://master.php.net/manage/user-notes.php?action=reject+46960&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#79279) next »