久久久久久久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. 將可點擊的錨標簽轉換為 html 文檔中的純文本

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

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

                  問題描述

                  限時送ChatGPT賬號..

                  我試圖在我的內容中匹配 <a> 標簽,并將它們替換為鏈接文本,后跟方括號中的 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> 包含另一個屬性,則匹配太多并且不會返回所需的結果.

                  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;
                  ?> 
                  

                  想要的結果:

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

                  推薦答案

                  您可以使用 ? 使匹配變得不貪婪.您還應該考慮到 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);
                  

                  這篇關于將可點擊的錨標簽轉換為 html 文檔中的純文本的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

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

                  相關文檔推薦

                  enable SOAP on PHP(在 PHP 上啟用 SOAP)
                  Get received XML from PHP SOAP Server(從 PHP SOAP 服務器獲取接收到的 XML)
                  not a valid AllXsd value(不是有效的 AllXsd 值)
                  PHP SoapClient: SoapFault exception Could not connect to host(PHP SoapClient:SoapFault 異常無法連接到主機)
                  Implementation of P_SHA1 algorithm in PHP(PHP中P_SHA1算法的實現)
                  Sending a byte array from PHP to WCF(將字節數組從 PHP 發送到 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>
                            主站蜘蛛池模板: 国产一区精品在线 | 国产精品手机在线 | ass亚洲尤物裸体pics | 欧美日韩成人在线 | 伊人成人在线 | 日本黄色一级视频 | 成人免费黄色片 | 国产又粗又大又爽 | 中文字幕在线免费视频 | 五月婷综合 | 欧美日韩中文 | 免费av网址在线观看 | 久久成人国产 | 91久久综合亚洲鲁鲁五月天 | 一区二区三区国产精品 | 亚洲欧美在线观看 | 欧美视频亚洲视频 | 激情久久av | 欧美亚洲日本 | 久久久久久久久久久国产 | 日韩精品三区 | 国产美女福利 | 久久久久一区二区 | 中文字幕av久久爽一区 | 精品一区二区三区免费毛片 | 中国少妇xxxxhd做受 | 日韩一区二区视频在线观看 | 国产黄色免费视频 | 日韩视频二区 | 亚洲欧美一区二区三区在线 | 懂色av一区二区夜夜嗨 | 日本中文字幕在线播放 | av毛片在线看 | 精品欧美一区二区精品久久 | 久久久久蜜桃 | 完全免费av | аⅴ资源新版在线天堂 | 欧美97| 日韩精品毛片 | av天天操| 成人国产精品免费观看 |