note 82818 deleted from function.preg-match by nlopess
| From: | nlopess@php.net | Date: | Sun, 27 Apr 2008 14:04:32 +0000 |
| Subject: | note 82818 deleted from function.preg-match by nlopess | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-138847@lists.php.net to get a copy of this message | ||
Note Submitter: Zander
----
I use this code to get what is between 2 tags, but there is a problem:
<?php
preg_match("/(<tr class=\"lit\"[^>]*>)(.*)(<\/tr>)/", $Rec_Data,
$coincidencias);
?>
I want it to get EXAMPLE in this code <tr class="lit">EXAMPLE</tr>
But when if the whole code is something like:
<tr class="lit">EXAMPLE</tr><tr>LOL</tr> it doesnt only get
EXAMPLE, it gets EXAMPLE</tr><tr>LOL, is there anything to get just EXAMPLE?
Thanks in advance