Remove the regular expression <?> What should I do with the text in the label?

Source: Internet
Author: User
Remove the regular expression & lt ;?? & Gt; when the text curl in the tag is used to parse a website, a BT problem occurs: the php code of a website does not use the complete & nbsp; & lt ;? Php & nbsp ;? & Gt; & nbsp; it is parsed as the html source code. How can I use regular expressions to remove the text in this php tag? Thank you. & Lt; div & nbsp; id = "content" & g regular removal Text in the label
When curl is used to parse a website, a BT problem occurs: the php code of a website is not completely used. It is parsed as the html source code. How can I use regular expressions to remove the text in this php tag? Thank you.


Some words

$ Box_social ['dimensioni'] = "80 ";
$ Box_vota = array ();
$ Box_vota ["novideo"] = '';
$ Box_vota ["nofoto"] = '';
$ Box_vota ["id_articolo"] = '000000 ';
Include ($ _ SERVER ['document _ root']. "/incs/box_social.php ");
?>

Some words

------ Solution --------------------
Preg_replace ('/<\?. *? \?> /', '', $ Html );
------ Solution --------------------
'/<\? (. + ?) \?> /Msi'

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.