-4
        <a class='jdr' href='javascript:void(0);' onClick="return openDiv('jrtp');"></a>            
        <span class="jcn">
            <a href="http://example.com/Ahmedabad/Aptech-N-Power-Hardware-Networking-&lt;near&gt;-Toll-Naka-Opp-Kakadia-Hospital-Below-Sankalp-Reataurant-Bapu-Nagar/079PXX79-XX79-110420173655-D4K6_QWhtZWRhYmFkIENDTkEgVHJhaW5pbmcgSW5zdGl0dXRlcw==_BZDET" title='Aptech N Power Hardware & Networking' >Aptech N Power Hardware & Networkin...</a>
        </span>         

            <section class="jrat">
                <a rel="nofollow" href="http://example.com/Ahmedabad/Aptech-N-Power-Hardware-Networking-&lt;near&gt;-Toll-Naka-Opp-Kakadia-Hospital-Below-Sankalp-Reataurant-Bapu-Nagar/079PXX79-XX79-110420173655-D4K6_QWhtZWRhYmFkIENDTkEgVHJhaW5pbmcgSW5zdGl0dXRlcw==_BZDET#rvw"><span class='s10'></span><span class='s10'></span><span class='s10'></span><span class='s10'></span><span class='s0'></span></a> 
                                        <a class="jrt" href="http://example.com/Ahmedabad/Aptech-N-Power-Hardware-Networking-&lt;near&gt;-Toll-Naka-Opp-Kakadia-Hospital-Below-Sankalp-Reataurant-Bapu-Nagar/079PXX79-XX79-110420173655-D4K6_QWhtZWRhYmFkIENDTkEgVHJhaW5pbmcgSW5zdGl0dXRlcw==_BZDET#rvw">2 ratings</a>
                    <span class="jrt"> |</span>
                                    <a class="rate_this" onclick="_ct('ratethis','lspg');"  href="http://example.com/Ahmedabad/Aptech-N-Power-Hardware-Networking-&lt;near&gt;-Toll-Naka-Opp-Kakadia-Hospital-Below-Sankalp-Reataurant-Bapu-Nagar/079PXX79-XX79-110420173655-D4K6_QWhtZWRhYmFkIENDTkEgVHJhaW5pbmcgSW5zdGl0dXRlcw==_BZDET/writereview">Rate this</a>
            </section>                      
        <section class="jcar">
            <section class="jbc">
                                        <a href="http://example.com/Ahmedabad/Aptech-N-Power-Hardware-Networking-&lt;near&gt;-Toll-Naka-Opp-Kakadia-Hospital-Below-Sankalp-Reataurant-Bapu-Nagar/079PXX79-XX79-110420173655-D4K6_QWhtZWRhYmFkIENDTkEgVHJhaW5pbmcgSW5zdGl0dXRlcw==_BZDET">
                        <img width="83" height="56" border="0" src="http://images.jdmagicbox.com/upload_test/ahmedabad/b4/079pxx79.xx79.110420172948.d4b4/logo/faf3f2409ed7993aaa70f848ab0bb6fb_t.jpg" class="Clogo" />
                    </a>
                                        <!-- <span class="noLogo"></span> -->
                                                        <section class="jrcl">
                    <p>
                        **A/35, Lakhani Chamber, Toll Naka, Opp Kakadia Hospital, Below Sankalp Reataurant, Bapu Nagar, Ahmedabad - 380024**                                                                |<a href="http://example.com/Ahmedabad/Aptech-N-Power-Hardware-Networking-&lt;near&gt;-Toll-Naka-Opp-Kakadia-Hospital-Below-Sankalp-Reataurant-Bapu-Nagar/079PXX79-XX79-110420173655-D4K6_QWhtZWRhYmFkIENDTkEgVHJhaW5pbmcgSW5zdGl0dXRlcw==_BZDET/map"> View Map</a><br>
                                                    </p>

从上面的 XML 数据中,我想提取以下内容 --- A/35、Lakhani Chamber、Toll Naka、Opp Kakadia 医院、Below Sankalp Reataurant、Bapu Nagar、艾哈迈达巴德 - 380024

我需要帮助来创建正则表达式来查找和删除所有包含特殊字符的行。我正在使用以下正则表达式 ---- /(\<.+?>)/g 请帮助。谢谢

4

2 回答 2

0

我想你想删除 HTML 标签的行,所以试试这个:

/^<.*>\n/g
于 2013-01-06T17:38:17.307 回答
0

试试这个

/(?<=\*{2})([^<>]*?)(?=\*{2})/g

它匹配**.

于 2013-01-06T18:42:59.620 回答