V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
NGINX
NGINX Trac
3rd Party Modules
Security Advisories
CHANGES
OpenResty
ngx_lua
Tengine
在线学习资源
NGINX 开发从入门到精通
NGINX Modules
ngx_echo
liuyinltemp
V2EX  ›  NGINX

nginx 的 subs_filter 模块怎么使用正则替换

  •  
  •   liuyinltemp · 2018-05-09 10:18:13 +08:00 · 3623 次点击
    这是一个创建于 2171 天前的主题,其中的信息可能已经有所发展或是发生改变。
    各位大牛,使用 subs_filter_module 替换广告,例如 sub_filter '<div id="menu">' '<div id="menu" style="display:none;">';
    现在一堆 div[id="ad_***"] 内容,想使用正则表达式写,sub_filter '<id="ad_***">' '<id="ad_***" style="display:none;">';div id^="ad_"]
    想这种,请教怎么写?
    目前尚无回复
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   1396 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 23:48 · PVG 07:48 · LAX 16:48 · JFK 19:48
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.