网络营销电子商务研究中心

网络营销电子商务研究中心 (https://www.0058.net/index.php)
-   代码交流 (https://www.0058.net/forumdisplay.php?f=16)
-   -   dreamweaver里如何用正则表达式,删除所有的链接(herf里的地址都不同) (https://www.0058.net/showthread.php?t=4475)

topvip 2013-01-27 05:02 PM

dreamweaver里如何用正则表达式,删除所有的链接(herf里的地址都不同)
 
请在dreamweaver里使用Ctrl+F呼出“查找和替换”,在其中录入:<a\s*href=('|").*?</a>注意复制的时候要没有空格,然后在“查找和替换”中的“选项”中选择“使用正则表达式”复选框,且不要选择“区分大小写”复选框,然后选择“替换”,或“全部替换”即可。

另一例:
<a href="http://www.discountglassesdirect.com/forums/member.php/4250-Burnstad" title="08:38 AM">Burnstad</a>

删除其中的 title="08:38 AM", 注意title前面有一个空格也要删除, 可以这么操作:

查找
" title=('|").*?">

替换
">


All times are GMT +8. The time now is 03:18 AM.

Powered by vBulletin Version 3.8.7
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.