这个正则如何匹配

WBOY
WBOYasal
2016-06-13 10:06:08929semak imbas

这个正则怎么匹配?
其中“联系人”和“联系人1”为联系人姓名,[email protected]@ss.com”为联系人邮箱,怎么讲他们匹配出来?

PHP code
<!--Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->    
联系人 [email protected] [写信] [列出来信] [编辑]
<script>Num++</script>
联系人 [email protected] [写信] [列出来信] [编辑]
<script>Num++</script>


------解决方案--------------------
PHP code
$match = '/<td><a>]*?)>([^]*?)>([^        <tbody>
<tr>            <td class="Addr_Td_Checkbox"><input type="checkbox" name="chk-_0_0_" value="hddf%40dd.com"></td>
<td class="Addr_Td_Name"><a href="ldvcapp?funcid=prtsearchres&sid=FAGuWpCkWFJAmgYZ&iid=0&mode=1&emptymode=1&print.x=1&tempname=address/add.htm">联系人</a></td>
<td class="Addr_Td_Address"><a href="ldvcapp?funcid=prtsearchres&sid=FAGuWpCkWFJAmgYZ&iid=0&mode=1&emptymode=1&print.x=1&tempname=address/add.htm">[email protected]</a></td>
<td class="Addr_Td_Opt">[<a href="/coremail/fcg/ldmmapp?sid=FAGuWpCkWFJAmgYZ&funcid=compose&to=%22%B5%C4%B7%A2%C9%FA%B5%D8%22%20%3Chddf%40dd.com%3E" target="_parent">写信</a>] [<a href="ldsrchapp?funcid=srchhand&sid=FAGuWpCkWFJAmgYZ&word=hddf%40dd.com&fromonly=yes&fid=0&subfolder=yes&perfectmatch=1&rtnurl=" target="_parent">列出来信</a>] [<a href="ldvcapp?funcid=loadiadd&iid=0&sid=FAGuWpCkWFJAmgYZ&ifirstv=&lid=&modify.x=1">编辑</a>]</td>        </tr>        </tbody>
<tbody>    <script>Num++</script><!--   2-->    <table class="Addr_setTable Addr_setTable_Con">        <tbody>
<tr>            <td class="Addr_Td_Checkbox"><input type="checkbox" name="chk-_0_1_" value="sdfdf%40ss.com"></td>
<td class="Addr_Td_Name"><a href="ldvcapp?funcid=prtsearchres&sid=FAGuWpCkWFJAmgYZ&iid=1&mode=1&emptymode=1&print.x=1&tempname=address/add.htm">联系人</a></td>
<td class="Addr_Td_Address"><a href="ldvcapp?funcid=prtsearchres&sid=FAGuWpCkWFJAmgYZ&iid=1&mode=1&emptymode=1&print.x=1&tempname=address/add.htm">[email protected]</a></td>
<td class="Addr_Td_Opt">[<a href="/coremail/fcg/ldmmapp?sid=FAGuWpCkWFJAmgYZ&funcid=compose&to=%22sfsdd%22%20%3Csdfdf%40ss.com%3E" target="_parent">写信</a>] [<a href="ldsrchapp?funcid=srchhand&sid=FAGuWpCkWFJAmgYZ&word=sdfdf%40ss.com&fromonly=yes&fid=0&subfolder=yes&perfectmatch=1&rtnurl=" target="_parent">列出来信</a>] [<a href="ldvcapp?funcid=loadiadd&iid=1&sid=FAGuWpCkWFJAmgYZ&ifirstv=&lid=&modify.x=1">编辑</a>]</td>        </tr>        </tbody>
<tbody>    </tbody>
</table>
<script>Num++</script>begin;preg_match_all($match,$str,$arr);var_dump($arr);<div class="clear">
                 
              
              
        
            </div>
</tbody></a></td>
Kenyataan:
Kandungan artikel ini disumbangkan secara sukarela oleh netizen, dan hak cipta adalah milik pengarang asal. Laman web ini tidak memikul tanggungjawab undang-undang yang sepadan. Jika anda menemui sebarang kandungan yang disyaki plagiarisme atau pelanggaran, sila hubungi admin@php.cn