Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

Regex to remove span tags using php [duplicate] codegrepper

<?php 
$content = '<div><span class="smw smw-inline smw-basic smw-ct-default smw-visible" data-symbol="GSD.V" data-type="inline" data-refresh-frequency="5" data-source="live">
<span class="smw-market-data-field smw-field-l1" data-field="l1">0.65</span>
</span></div>';
echo $string =  preg_replace('/<[^>]*>/', '', $content);
echo $new_string = preg_replace('/<span[^>]+>/i', '', $content); 
?>
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #Regex #remove #span #tags #php #codegrepper
ADD COMMENT
Topic
Name
5+4 =