跳转到内容
主菜单
主菜单
移至侧栏
隐藏
导航
首页
最近更改
随机页面
MediaWiki帮助
特殊页面
Tiancheng Wiki
搜索
搜索
中文(中国大陆)
外观
创建账号
登录
个人工具
创建账号
登录
查看“︁模块:If in page”︁的源代码
模块
讨论
English
阅读
查看源代码
查看历史
工具
工具
移至侧栏
隐藏
操作
阅读
查看源代码
查看历史
常规
链入页面
相关更改
页面信息
外观
移至侧栏
隐藏
←
模块:If in page
因为以下原因,您没有权限编辑该页面:
您请求的操作仅限属于该用户组的用户执行:
用户
您可以查看和复制此页面的源代码。
local p = {} local getArgs = require('Module:Arguments').getArgs function p.match(args) if not args["page"] then args.page = mw.title.getCurrentTitle().fullText end local page = mw.title.new(args.page) if not page then return args["3"] or "" end local content = page:getContent() if not content then return args["3"] or "" end if mw.ustring.match(content, args["1"] or "") then if args["subst"] then local pattern = args["1"] or "" if mw.ustring.sub(pattern, 1, 1) ~= "^" then pattern = "^.-" .. pattern end if mw.ustring.sub(pattern, -1) ~= "$" then pattern = pattern .. ".*$" end local out = mw.ustring.gsub(content, pattern, args["2"] or "") return out else return args["2"] or "" end else return args["3"] or "" end end function p.main(frame) local args = getArgs(frame) return p.match(args) end return p
返回
模块:If in page
。
搜索
搜索
查看“︁模块:If in page”︁的源代码
添加语言
添加话题