Maison >développement back-end >tutoriel php >正则表达式 - 求php正则匹配table标签

正则表达式 - 求php正则匹配table标签

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBoriginal
2016-06-06 20:11:491431parcourir

table里面所有的内容都不要过滤掉,包括标签和内容。

<code><table id="Table1" class="blacktab" bordercolor="Black" border="0" width="100%">

//内容

</table>
</code>

回复内容:

table里面所有的内容都不要过滤掉,包括标签和内容。

<code><table id="Table1" class="blacktab" bordercolor="Black" border="0" width="100%">

//内容

</table>
</code>

<code>preg_match("/<table>]*?>(.*?)/s",$html,$match);

print_r($match[1]);

                            
            <p class="answer fmt" data-id="1020000004944935">
                                    </p>
<pre class="brush:php;toolbar:false"><code><?php $s = file_get_contents('./table.html');
preg_match('/<table[^>]*>(.*)/is', $s, $arMatch);
var_export($arMatch);
?></code>

<code>preg_match('/<table.>(.*?)/s',$str,$match);</table.></code>
Déclaration:
Le contenu de cet article est volontairement contribué par les internautes et les droits d'auteur appartiennent à l'auteur original. Ce site n'assume aucune responsabilité légale correspondante. Si vous trouvez un contenu suspecté de plagiat ou de contrefaçon, veuillez contacter admin@php.cn