Home  >  Article  >  Backend Development  >  求教一个正则表达式的问题

求教一个正则表达式的问题

WBOY
WBOYOriginal
2016-06-06 20:37:471100browse

我正则表达式不是特别熟悉,现在需求如下,我需要用程序删除指定的HTML代码中中一些无用的代码,html代码如下:

<code>html</code><code>


<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="ProgId" content="Word.Document">
<meta name="Generator" content="Microsoft Word 12">
<meta name="Originator" content="Microsoft Word 12">
<link rel="File-List" href="testandtest.files/filelist.xml">
<link rel="Preview" href="testandtest.files/preview.wmf">
<!--[if gte mso 9]><xml>
 <o:DocumentProperties>
  <o:Author>testandtest1</o:Author>
  <o:LastAuthor>testandtest1</o:LastAuthor>
  <o:Revision>2</o:Revision>
  <o:TotalTime>1</o:TotalTime>
  <o:Created>2015-01-20T03:52:00Z</o:Created>
  <o:LastSaved>2015-01-20T03:52:00Z</o:LastSaved>
  <o:Pages>2</o:Pages>
  <o:Words>98</o:Words>
  <o:Characters>564</o:Characters>
  <o:Company>china</o:Company>
  <o:Lines>4</o:Lines>
  <o:Paragraphs>1</o:Paragraphs>
  <o:CharactersWithSpaces>661</o:CharactersWithSpaces>
  <o:Version>12.00</o:Version>
 </o:DocumentProperties>
 <o:OfficeDocumentSettings>
  <o:AllowPNG/>
 </o:OfficeDocumentSettings>
</xml><![endif]-->
<link rel="themeData" href="testandtest.files/themedata.thmx">
<link rel="colorSchemeMapping" href="testandtest.files/colorschememapping.xml">
</code>
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn