note 110677 added to function.preg-replace
| From: | 360 at xonline dot com | Date: | Thu, 22 Nov 2012 03:05:42 +0000 |
| Subject: | note 110677 added to function.preg-replace | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-192069@lists.php.net to get a copy of this message | ||
i have made this code for my php but i cant figure out how to remove only span tags.. the function
is to copy what ever in the <b class="(.*)">(.*)</b> but, i want to remove the
span class or span style.
the grabbed
<b class="sleepy"><span class="good" style="color: white;
font-weight: bold; text-shadow: 0px 0px 0.4em #FF9966, 0px 0px 0.4em #FF9966, 0px 0px 0.4em #FF9966,
0px 0px 0.4em #FF9966, 0px 0px 0.4em #FF9966;"
title="CODER">blood</span></b>
my php
preg_match('%<b class="(.*)">(.*)</b>%U', $mess, $mem);
$name = $mem[2];
how do i copy "blood" without span class, because some "blood" dont have span
class and span style and some have
----
Server IP: 69.147.83.199
Probable Submitter: 219.92.17.233
----
Manual Page -- http://www.php.net/manual/en/function.preg-replace.php
Edit -- https://master.php.net/note/edit/110677
Del: integrated -- https://master.php.net/note/delete/110677/integrated
Del: useless -- https://master.php.net/note/delete/110677/useless
Del: bad code -- https://master.php.net/note/delete/110677/bad+code
Del: spam -- https://master.php.net/note/delete/110677/spam
Del: non-english -- https://master.php.net/note/delete/110677/non-english
Del: in docs -- https://master.php.net/note/delete/110677/in+docs
Del: other reasons-- https://master.php.net/note/delete/110677
Reject -- https://master.php.net/note/reject/110677
Search -- https://master.php.net/manage/user-notes.php