当前位置:首页 >> 网页制作

Dreamweaver里使用正则表达式替换字符的一个例子

原文本是

复制代码代码如下:
<a href="{SITE_URL}s/Goelia%2f%b8%e8%c0%f2%e6%ab/" target="_blank">Goelia/歌莉娅</a></dd> <dd><a href="{SITE_URL}s/%bc%be%ba%f2%b7%e7/" target="_blank">季候风</a></dd> <dd><a href="{SITE_URL}s/Mickey%2f%c3%d7%c6%e6/" target="_blank">Mickey/ 米奇</a></dd> <dd><a href="{SITE_URL}s/%c0%cb%c2%fe%d2%bb%c9%ed/" target="_blank">浪 漫一身</a></dd> <dd><a href="{SITE_URL}s/Miss+sixty/" target="_blank">Miss sixty</a></dd> <dd><a href="{SITE_URL}s/%cf%e3%d3%b0/" target="_blank">香影</a></dd> <dd><a href="{SITE_URL}s/Jorya%2f%d7%bf%d1%c5/" target="_blank">Jorya/ 卓雅</a></dd> <dd><a href="{SITE_URL}s/Ports%2f%b1%a6%d7%cb/" target="_blank">Ports/ 宝姿</a></dd> <dd><a href="{SITE_URL}s/Gucci%2f%b9%c5%c6%e6/" target="_blank">Gucci/ 古奇</a></dd> <dd><a href="{SITE_URL}s/Jeanswest%2f%d5%e6%ce%ac%cb%b9/" target="_blank">Jeanswest/真维斯</a></dd> <dd><a href="{SITE_URL}s/Uniqlo%2f%d3%c5%d2%c2%bf%e2/" target="_blank">Uniqlo/优衣库</a></dd> <dd><a href="{SITE_URL}s/Chanel%2f+%cf%e3%c4%ce%b6%f9/" target="_blank">Chanel/ 香奈儿</a></dd> <dd><a href="{SITE_URL}s/EDC/" target="_blank">EDC</a></dd> <dd><a href="{SITE_URL}s/Paul+Frank%2f%b4%f3%d7%ec%ba%ef/" target="_blank">Paul Frank/大嘴猴</a></dd> <dd><a href="{SITE_URL}s/Chee%2f%c7%a7%b0%d9%bb%dd/" target="_blank">Chee/千百惠</a></dd> <dd><a href="{SITE_URL}s/Polo%2f%b1%a3%c2%de/" target="_blank">Polo/ 保罗</a></dd> <dd><a href="{SITE_URL}s/%b0%c5%b5%d9%c4%c8/" target="_blank">芭蒂娜</a></dd> <dd><a href="{SITE_URL}s/BCBG/" target="_blank">BCBG</a></dd> <dd><a href="{SITE_URL}s/Esprit/" target="_blank">Esprit</a></dd> <dd><a href="{SITE_URL}s/Marc+Jacobs%2f%c2%ed%bf%cb%d1%c5%b8%f7%b2%bc%cb%b9/" target="_blank">Marc Jacobs/马克雅各布斯</a></dd> <dd><a href="{SITE_URL}s/COCOON%2f%bf%c9%bf%c9%c4%e1/" target="_blank">COCOON/可可尼</a></dd> <dd><a href="{SITE_URL}s/Dior%2f%b5%cf%b0%c2/" target="_blank">Dior/ 迪奥</a></dd> <dd><a href="{SITE_URL}s/%c7%c9%b2%af/" target="_blank">巧帛</a></dd> </dl><dl><dt>品牌
上升</dt> <dd><a href="{SITE_URL}s/%cb%bc%d1%f4/" target="_blank">思阳</a></dd> <dd><a href="{SITE_URL}s/YIEMAY%2f%d2%e4%c3%b5/" target="_blank">YIEMAY/ 忆玫</a></dd> <dd><a href="{SITE_URL}s/%b2%bc%d2%c2%cc%ec%ca%b9/" target="_blank">布 衣天使</a></dd> <dd><a href="{SITE_URL}s/ICICLE/" target="_blank">ICICLE</a></dd> <dd><a href="{SITE_URL}s/SIS/" target="_blank">SIS</a></dd> <dd><a href="{SITE_URL}s/K.KENNY%2f%bf%db%bf%db/" target="_blank">K.KENNY/ 扣扣</a></dd> <dd><a href="{SITE_URL}s/%bd%f0%ec%e4/" target="_blank">金熹</a></dd> <dd><a href="{SITE_URL}s/Kookai/" target="_blank">Kookai</a></dd> <dd><a href="{SITE_URL}s/OTT/" target="_blank">OTT</a></dd> <dd><a href="{SITE_URL}s/%d2%c0%c0%d9/" target="_blank">依蕾</a></dd> <dd><a href="{SITE_URL}s/%c9%ba%b6%fb%c0%f6%d1%a9/" target="_blank">珊 尔丽雪</a></dd> <dd><a href="{SITE_URL}s/ANNE+KLEIN/" target="_blank">ANNE KLEIN</a></dd> <dd><a href="{SITE_URL}s/Amelie%2f%c9%dd%b0%ae/" target="_blank">Amelie/ 奢爱</a></dd> <dd><a href="{SITE_URL}s/ZhuZhuShow%2f%d6%e9%d6%e9%d0%e5/" target="_blank">ZhuZhuShow/珠珠绣</a></dd> <dd><a href="{SITE_URL}s/%d1%c5%c2%b9/" target="_blank">雅鹿</a></dd> <dd><a href="{SITE_URL}s/ICB/" target="_blank">ICB</a></dd> <dd><a href="{SITE_URL}s/Loyer%2f%c8%d8%d4%c3/" target="_blank">Loyer/ 蓉悦</a></dd> <dd><a href="{SITE_URL}s/MARNI/" target="_blank">MARNI</a></dd> <dd><a href="{SITE_URL}s/Sea.Biscuit%2f%c7%b3%b2%dd/" target="_blank">Sea.Biscuit/浅草</a></dd> <dd><a href="{SITE_URL}s/TB2/" target="_blank">TB2</a></dd> <dd><a href="{SITE_URL}s/%c0%bc%ce%f5/" target="_blank">兰熙</a></dd> <dd><a href="{SITE_URL}s/%c0%ca%d7%cb/" target="_blank">朗姿</a></dd> <dd><a href="{SITE_URL}s/B%26W%2f%ba%da%d3%eb%b0%d7/" target="_blank">B&amp;W/黑与白</a></dd> <dd><a href="{SITE_URL}s/Chanel%2f%cf%e3%c4%ce%b6%fb/" target="_blank">Chanel/香奈尔</a></dd> <dd><a href="{SITE_URL}s/miu+miu/" target="_blank">miu miu</a></dd> <dd><a href="{SITE_URL}s/Eitie%2f%b0%ae%cc%d8%b0%ae/" target="_blank">Eitie/爱特爱</a></dd> <dd><a href="{SITE_URL}s/Exun%2f%d2%c2%d1%b6/" target="_blank">Exun/ 衣讯</a></dd> <dd><a href="{SITE_URL}s/MNG/" target="_blank">MNG</a></dd> <dd><a href="{SITE_URL}s/MOISELLE%2f%c4%bd%ca%ab/" target="_blank">MOISELLE/ 慕诗</a></dd> <dd><a href="{SITE_URL}s/ZUCZUG/" target="_blank">ZUCZUG</a></dd> <dd><a href="{SITE_URL}s/biaomian%2f%b1%ed%c3%e6/" target="_blank">biaomian/ 表面</a></dd> <dd><a href="{SITE_URL}s/moncler/" target="_blank">moncler</a></dd> <dd><a href="{SITE_URL}s/odbo/" target="_blank">odbo</a></dd> <dd><a href="{SITE_URL}s/%b0%ac%b7%f2%cb%b9/" target="_blank">艾夫斯</a></dd> <dd><a href="{SITE_URL}s/%b0%ac%c9%d0%d1%a9/" target="_blank">艾尚雪</a></dd> <dd><a href="{SITE_URL}s/Burberry%2f%b0%cd%b1%a6%c0%fb/" target="_blank">Burberry/巴宝利</a></dd> <dd><a href="{SITE_URL}s/Dazzle%2f%b4%fa%d7%bf/" target="_blank">Dazzle/ 代卓</a></dd> <dd><a href="{SITE_URL}s/EDC/" target="_blank">EDC</a></dd> <dd><a href="{SITE_URL}s/Elle/" target="_blank">Elle</a></dd> <dd><a href="{SITE_URL}s/Finette%2f%b7%d7%c0%f6/" target="_blank">Finette/ 纷丽</a></dd> </dl><dl><dt>关注
热门</dt> <dd><a href="{SITE_URL}s/%c1%ac%d2%c2%c8%b9+%ca%be%cc%ef%d0%ac%b7%fe/" target="_blank">连衣裙 示田鞋服</a></dd> <dd><a href="{SITE_URL}s/%d1%a9%b7%c4/" target="_blank">雪纺</a></dd> <dd><a href="{SITE_URL}s/%c1%ac%cc%e5%bf%e3/" target="_blank">连体裤</a></dd> <dd><a href="{SITE_URL}s/%b4%f3%c2%eb/" target="_blank">大码</a></dd> <dd><a href="{SITE_URL}s/%c1%ac%d2%c2%c8%b92010%cf%c4%d7%b0%d0%c2%bf%ee/" target="_blank">连衣裙2010夏装新款</a></dd> <dd><a href="{SITE_URL}s/%d1%a9%b7%c4+%c1%ac%d2%c2%c8%b9/" target="_blank">雪纺 连衣裙</a></dd> <dd><a href="{SITE_URL}s/%c5%ae%d7%b0+%cf%c4%d7%b0/" target="_blank">女装 夏装</a></dd> <dd><a href="{SITE_URL}s/zara/" target="_blank">zara</a></dd> <dd><a href="{SITE_URL}s/%c7%e9%c2%c2%d7%b0/" target="_blank">情侣装</a></dd> <dd><a href="{SITE_URL}s/%b3%a4%bf%ee/" target="_blank">长款</a></dd> <dd><a href="{SITE_URL}s/%b3%a4%c8%b9/" target="_blank">长裙</a></dd> <dd><a href="{SITE_URL}s/T%d1%aa%c9%c0/" target="_blank">T血衫</a></dd> <dd><a href="{SITE_URL}s/%c5%a3%d7%d0%bf%e3/" target="_blank">牛仔裤</a></dd> <dd><a href="{SITE_URL}s/h%26m/" target="_blank">h&amp;m</a></dd> <dd><a href="{SITE_URL}s/%b0%ac%b8%f1+2010+%cf%c4%bf%ee%d5%fd%c6%b7/" target="_blank">艾格 2010 夏款正品</a></dd> <dd><a href="{SITE_URL}s/%c5%a3%d7%d0%b6%cc%bf%e3/" target="_blank">牛 仔短裤</a></dd> <dd><a href="{SITE_URL}s/%c5%a3%d7%d0%c8%b9/" target="_blank">牛仔裙</a></dd> <dd><a href="{SITE_URL}s/%b6%cc%bf%e3/" target="_blank">短裤</a></dd> <dd><a href="{SITE_URL}s/vero+moda/" target="_blank">vero moda</a></dd> <dd><a href="{SITE_URL}s/%c6%ec%c5%db/" target="_blank">旗袍</a></dd> <dd><a href="{SITE_URL}s/%b8%df%d1%fc/" target="_blank">高腰</a></dd> <dd><a href="{SITE_URL}s/%c8%b9%d7%d3+%cf%c4%d7%b0/" target="_blank">裙子 夏装</a></dd> <dd><a href="{SITE_URL}s/%b1%b3%b4%f8%bf%e3/" target="_blank">背带裤</a></dd> <dd><a href="{SITE_URL}s/%c1%ac%c9%ed%bf%e3/" target="_blank">连身裤</a></dd> <dd><a href="{SITE_URL}s/%d5%e6%cb%bf/" target="_blank">真丝</a></dd> <dd><a href="{SITE_URL}s/%b9%fe%c2%d7%bf%e3/" target="_blank">哈伦裤</a></dd> <dd><a href="{SITE_URL}s/%b4%f2%b5%d7%bf%e3/" target="_blank">打底裤</a></dd> <dd><a href="{SITE_URL}s/%b4%f3%c2%eb+%c5%ae%d7%b0+%cf%c4%d7%b0/" target="_blank">大码 女装 夏装</a></dd> <dd><a href="{SITE_URL}s/%b3%c4%c9%c0/" target="_blank">衬衫</a></dd> </dl><dl><dt>关注
上升</dt> <dd><a href="{SITE_URL}s/%b8%e7%b5%dc+%c5%ae%d7%b0+%d7%a8%b9%f1/" target="_blank">哥弟 女装 专柜</a></dd> <dd><a href="{SITE_URL}s/%ba%ab%b9%fa%b4%fa%b9%ba+%c5%ae%d7%b0+2010/" target="_blank">韩国代购 女装 2010</a></dd> <dd><a href="{SITE_URL}s/lily+%d7%a8%b9%f1+%d5%fd%c6%b7/" target="_blank">lily 专柜 正品</a></dd> <dd><a href="{SITE_URL}s/%ca%b5%c5%c4+%b0%d7%c9%ab+%c7%a6%b1%ca%bf%e3+%d0%a1%bd%c5%bf%e3/" target="_blank">实拍 白色 铅笔裤 小脚裤</a></dd> <dd><a href="{SITE_URL}s/%c5%a3%d7%d0+%b1%b3%b4%f8%bf%e3+%c5%ae/" target="_blank">牛仔 背带裤 女</a></dd> <dd><a href="{SITE_URL}s/%d4%ad%b5%a5+%cd%e2%c3%b3+%b4%f3%c2%eb/" target="_blank">原单 外贸 大码</a></dd> <dd><a href="{SITE_URL}s/%b8%e7%b5%dc+%d7%a8%b9%f1+%d5%fd%c6%b7/" target="_blank">哥弟 专柜 正品</a></dd> <dd><a href="{SITE_URL}s/hello+kitty/" target="_blank">hello kitty</a></dd> <dd><a href="{SITE_URL}s/%c7%ef%cb%ae%d2%c1%c8%cb+%d7%a8%b9%f1+%d5%fd%c6%b7/" target="_blank">秋水伊人 专柜 正品</a></dd> <dd><a href="{SITE_URL}s/babyfox+%d7%a8%b9%f1%d5%fd%c6%b7/" target="_blank">babyfox 专柜正品</a></dd> <dd><a href="{SITE_URL}s/%c1%ac%c9%ed%b6%cc%bf%e3/" target="_blank">连 身短裤</a></dd> <dd><a href="{SITE_URL}s/%c1%ac%d2%c2%bf%e3+%c5%a3%d7%d0/" target="_blank">连衣裤 牛仔</a></dd> <dd><a href="{SITE_URL}s/%c0%ca%d7%cb+%d7%a8%b9%f1%d5%fd%c6%b7+2010/" target="_blank">朗姿 专柜正品 2010</a></dd> <dd><a href="{SITE_URL}s/%c7%ef%cb%ae%d2%c1%c8%cb10%b4%ba%d7%b0+%d5%fd%c6%b7/" target="_blank">秋水伊人10春装 正品</a></dd> <dd><a href="{SITE_URL}s/%c0%cb%c2%fe%d0%fb%d1%d4+%d7%a8%b9%f1+%d5%fd%c6%b7/" target="_blank">浪漫宣言 专柜 正品</a></dd> <dd><a href="{SITE_URL}s/%d6%b1%cd%b2%c5%a3%d7%d0%bf%e3/" target="_blank">直筒牛仔裤</a></dd> <dd><a href="{SITE_URL}s/%d0%c2%bf%ee+%cf%d4%ca%dd/" target="_blank">新款 显瘦</a></dd> <dd><a href="{SITE_URL}s/%d2%e0%b9%c8+%d7%a8%b9%f1%d5%fd%c6%b7/" target="_blank">亦谷 专柜正品</a></dd> <dd><a href="{SITE_URL}s/%ba%ec%d0%e4+%d5%fd%c6%b7/" target="_blank">红袖 正品</a></dd> <dd><a href="{SITE_URL}s/%b4%cc%d0%e5/" target="_blank">刺绣</a></dd> <dd><a href="{SITE_URL}s/%b4%f3%c2%eb+%d1%a9%b7%c4+%c9%cf%d2%c2/" target="_blank">大码 雪纺 上衣</a></dd> <dd><a href="{SITE_URL}s/%b8%e8%c0%f2%e6%ab+%d5%fd%c6%b7/" target="_blank">歌莉娅 正品</a></dd> <dd><a href="{SITE_URL}s/%c1%ac%c9%ed%bf%e3+%b6%cc%bf%e3/" target="_blank">连身裤 短裤</a></dd> <dd><a href="{SITE_URL}s/topshop+%b4%fa%b9%ba/" target="_blank">topshop 代购</a></dd> <dd><a href="{SITE_URL}s/%cd%e2%cc%d7+%cf%c4/" target="_blank">外套 夏</a></dd> <dd><a href="{SITE_URL}s/%d6%d0%c4%ea%c5%ae%d7%b0+%cf%c4+%d7%b0+%ba%ab%b0%e6/" target="_blank">中年女装 夏 装 韩版</a></dd> <dd><a href="{SITE_URL}s/zara+%b4%fa%b9%ba+2010/" target="_blank">zara 代购 2010</a></dd> <dd><a href="{SITE_URL}s/%d1%c7%c2%e9%bf%e3+%c5%ae%bf%e3/" target="_blank">亚麻裤 女裤</a></dd> <dd><a href="{SITE_URL}s/%ba%ec%d0%e4+2010/" target="_blank">红袖 2010</a></dd> <dd><a href="{SITE_URL}s/%d2%d4%b4%bf+%d5%fd%c6%b7+%c5%ae%d7%b0/" target="_blank">以纯 正品 女装</a></dd> <dd><a href="{SITE_URL}s/%c6%ae%c0%d9+2010%cf%c4%d7%b0+%d5%fd%c6%b7/" target="_blank">飘蕾 2010夏装 正品</a></dd> <dd><a href="{SITE_URL}s/%cc%c7%b9%fb+%bf%aa%c9%c0/" target="_blank">糖果 开衫</a></dd> <dd><a href="{SITE_URL}s/%d1%a9%b7%c4+%b9%ab%d6%f7+%b4%f3%c2%eb/" target="_blank">雪纺 公主 大码</a></dd> <dd><a href="{SITE_URL}s/%d0%a1%ce%f7%d7%b0+%b6%cc%d0%e4/" target="_blank">小西装 短袖</a></dd> <dd><a href="{SITE_URL}s/%d5%e6%cb%bf%c9%cf%d2%c2/" target="_blank">真 丝上衣</a></dd> <dd><a href="{SITE_URL}s/%ca%b1%c9%d0%c5%ae%d7%b0/" target="_blank">时 尚女装</a></dd> <dd><a href="{SITE_URL}s/zara+%d5%fd%c6%b7+2010/" target="_blank">zara 正品 2010</a></dd> <dd><a href="{SITE_URL}s/%d0%a1%b7%c9%d0%e4/" target="_blank">小飞袖</a></dd> <dd><a href="{SITE_URL}s/%cd%e2%c3%b3%d4%ad%b5%a5/" target="_blank">外 贸原单</a></dd> <dd><a href="{SITE_URL}s/%c7%e9%c2%c2%cc%d7%d7%b0/" target="_blank">情 侣套装</a>



我想把所有的a的href属性替换成{SITE_URL}ts/{url_base64_encode('朵以')}/,因为上述文本中的href属性前部分相同,s/后面的内容不同,而且基本是数字加字母加%,我们使用反义\S+匹配不包含空白符的字符串。则“查找里填写”

{SITE_URL}s/\S+/

OK,点击全部替换