久久久久久久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. 將可點擊的錨標(biāo)簽轉(zhuǎn)換為 html 文檔中的純文本

        Convert clickable anchor tags to plain text in html document(將可點擊的錨標(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>

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

                  問題描述

                  限時送ChatGPT賬號..

                  我試圖在我的內(nèi)容中匹配 <a> 標(biā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> 包含另一個屬性,則匹配太多并且不會返回所需的結(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)于將可點擊的錨標(biāo)簽轉(zhuǎn)換為 html 文檔中的純文本的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

                  【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請聯(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算法的實現(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>
                            主站蜘蛛池模板: 色视频www在线播放国产人成 | www.婷婷| 三级黄视频在线观看 | 久久免费视频在线 | 欧美一级欧美一级在线播放 | 日韩激情在线 | 国产区精品视频 | 精品免费视频 | 搞黄网站在线观看 | 亚洲综合色视频在线观看 | 99re在线视频观看 | 日韩中文字幕视频 | 在线中文字幕av | 国产高清无av久久 | 一区二区三区av夏目彩春 | 99re热精品视频 | 国产视频福利 | 欧美日韩综合精品 | 色免费在线视频 | 欧美综合久久 | 国产精品久久久乱弄 | 国产精品日韩在线观看 | 国产乱码久久久久久一区二区 | 手机日韩 | 99久久精品免费看国产小宝寻花 | 伊人久久综合 | 区一区二区三在线观看 | 激情国产 | 天天射色综合 | 亚洲精品一区中文字幕乱码 | 欧美一级淫片免费视频黄 | 亚洲欧美精品国产一级在线 | 中文字幕日韩一区 | 国产日韩欧美精品一区二区 | 亚洲午夜精品 | 99福利在线观看 | 欧美在线观看一区二区 | 久久久日韩精品一区二区三区 | 农夫在线精品视频免费观看 | 中文字幕在线视频一区二区三区 | 成人在线免费视频 |