久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

    • <bdo id='DZPDp'></bdo><ul id='DZPDp'></ul>
  • <tfoot id='DZPDp'></tfoot>

    <small id='DZPDp'></small><noframes id='DZPDp'>

      <legend id='DZPDp'><style id='DZPDp'><dir id='DZPDp'><q id='DZPDp'></q></dir></style></legend>
      <i id='DZPDp'><tr id='DZPDp'><dt id='DZPDp'><q id='DZPDp'><span id='DZPDp'><b id='DZPDp'><form id='DZPDp'><ins id='DZPDp'></ins><ul id='DZPDp'></ul><sub id='DZPDp'></sub></form><legend id='DZPDp'></legend><bdo id='DZPDp'><pre id='DZPDp'><center id='DZPDp'></center></pre></bdo></b><th id='DZPDp'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='DZPDp'><tfoot id='DZPDp'></tfoot><dl id='DZPDp'><fieldset id='DZPDp'></fieldset></dl></div>

      1. 將可點(diǎn)擊的錨標(biāo)簽轉(zhuǎn)換為 html 文檔中的純文本

        Convert clickable anchor tags to plain text in html document(將可點(diǎn)擊的錨標(biāo)簽轉(zhuǎn)換為 html 文檔中的純文本)
          <tbody id='jdPCb'></tbody>
          <bdo id='jdPCb'></bdo><ul id='jdPCb'></ul>

          <small id='jdPCb'></small><noframes id='jdPCb'>

        • <i id='jdPCb'><tr id='jdPCb'><dt id='jdPCb'><q id='jdPCb'><span id='jdPCb'><b id='jdPCb'><form id='jdPCb'><ins id='jdPCb'></ins><ul id='jdPCb'></ul><sub id='jdPCb'></sub></form><legend id='jdPCb'></legend><bdo id='jdPCb'><pre id='jdPCb'><center id='jdPCb'></center></pre></bdo></b><th id='jdPCb'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='jdPCb'><tfoot id='jdPCb'></tfoot><dl id='jdPCb'><fieldset id='jdPCb'></fieldset></dl></div>

        • <legend id='jdPCb'><style id='jdPCb'><dir id='jdPCb'><q id='jdPCb'></q></dir></style></legend>
          <tfoot id='jdPCb'></tfoot>

                  本文介紹了將可點(diǎn)擊的錨標(biāo)簽轉(zhuǎn)換為 html 文檔中的純文本的處理方法,對(duì)大家解決問題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

                  問題描述

                  限時(shí)送ChatGPT賬號(hào)..

                  我試圖在我的內(nèi)容中匹配 <a> 標(biāo)簽,并將它們替換為鏈接文本,后跟方括號(hào)中的 url 用于打印版本.

                  I am trying to match <a> tags within my content and replace them with the link text followed by the url in square brackets for a print-version.

                  如果只有href",則以下示例有效.如果 <a> 包含另一個(gè)屬性,則匹配太多并且不會(huì)返回所需的結(jié)果.

                  The following example works if there is only the "href". If the <a> contains another attribute, it matches too much and doesn't return the desired result.

                  如何匹配 URL 和鏈接文本,僅此而已?

                  How can I match the URL and the link text and that's it?

                  這是我的代碼:

                  <?php
                  $content = '<a href="http://www.website.com">This is a text link</a>';
                  $result = preg_replace('/<a href="(http://[A-Za-z0-9\.:/]{1,})">([\s\S]*?)</a>/',
                       '<strong>\2</strong> [\1]', $content);
                  echo $result;
                  ?> 
                  

                  想要的結(jié)果:

                  <strong>This is a text link </strong> [http://www.website.com]
                  

                  推薦答案

                  您可以使用 ? 使匹配變得不貪婪.您還應(yīng)該考慮到 href 屬性之前可能有一些屬性.

                  You can make the match ungreedy using ?. You should also take into account there may be attributes before the href attribute.

                  $result = preg_replace('/<a [^>]*?href="(http://[A-Za-z0-9\.:/]+?)">([\s\S]*?)</a>/',
                      '<strong>\2</strong> [\1]', $content);
                  

                  這篇關(guān)于將可點(diǎn)擊的錨標(biāo)簽轉(zhuǎn)換為 html 文檔中的純文本的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

                  【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請(qǐng)聯(lián)系我們刪除處理,感謝您的支持!

                  相關(guān)文檔推薦

                  enable SOAP on PHP(在 PHP 上啟用 SOAP)
                  Get received XML from PHP SOAP Server(從 PHP SOAP 服務(wù)器獲取接收到的 XML)
                  not a valid AllXsd value(不是有效的 AllXsd 值)
                  PHP SoapClient: SoapFault exception Could not connect to host(PHP SoapClient:SoapFault 異常無法連接到主機(jī))
                  Implementation of P_SHA1 algorithm in PHP(PHP中P_SHA1算法的實(shí)現(xiàn))
                  Sending a byte array from PHP to WCF(將字節(jié)數(shù)組從 PHP 發(fā)送到 WCF)
                    <tfoot id='GqjG8'></tfoot>

                        <bdo id='GqjG8'></bdo><ul id='GqjG8'></ul>

                        <small id='GqjG8'></small><noframes id='GqjG8'>

                        <i id='GqjG8'><tr id='GqjG8'><dt id='GqjG8'><q id='GqjG8'><span id='GqjG8'><b id='GqjG8'><form id='GqjG8'><ins id='GqjG8'></ins><ul id='GqjG8'></ul><sub id='GqjG8'></sub></form><legend id='GqjG8'></legend><bdo id='GqjG8'><pre id='GqjG8'><center id='GqjG8'></center></pre></bdo></b><th id='GqjG8'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='GqjG8'><tfoot id='GqjG8'></tfoot><dl id='GqjG8'><fieldset id='GqjG8'></fieldset></dl></div>
                        <legend id='GqjG8'><style id='GqjG8'><dir id='GqjG8'><q id='GqjG8'></q></dir></style></legend>

                              <tbody id='GqjG8'></tbody>
                            主站蜘蛛池模板: 日本精品一区二区三区在线观看视频 | 青青久草| 中文字幕一区二区三区日韩精品 | 在线看片国产精品 | 亚洲精品一区二区二区 | 成人免费视频在线观看 | 国产成人影院 | 亚洲视频在线播放 | 国产乱码精品一区二区三区忘忧草 | 免费在线视频精品 | 在线观看国产视频 | 在线 丝袜 欧美 日韩 制服 | 国产7777 | 国产日韩一区二区三区 | 精品国产乱码久久久久久蜜柚 | 国产精品毛片一区二区三区 | 日韩一二区在线 | 中文字幕91 | 久久伊人影院 | 别c我啊嗯国产av一毛片 | 国产精品大片在线观看 | 国产乱码精品一区二区三区忘忧草 | 国产一极毛片 | 亚洲午夜在线 | 日韩国产欧美一区 | 欧美成人免费在线 | 中文字幕免费 | 日韩av中文| 精品视频久久久 | 久久国产成人 | 精品网站999| 男人的天堂在线视频 | 伊人二区| 一区二区三区成人 | 国产91视频一区二区 | 久久最新精品 | 日日操夜夜操天天操 | 日韩中文一区二区三区 | 亚洲欧洲在线视频 | 国产乱码久久久 | 国产视频在线一区二区 |