Dreamweaver正则表达式查找并替换为正则表达式 [英] Dreamweaver Regex Find and Replace with Regular Expression

查看:130
本文介绍了Dreamweaver正则表达式查找并替换为正则表达式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的网站上有很多实例,其中无意中包含以下代码:

I have many instances throughout my site where I have inadvertently included the following code:

if (isset(htmlspecialchars($_GET['u'])))

我需要进行广泛的查找/替换才能将其变为代码如下:

I need to do a widespread find/replace to turn that code into this:

if (isset($_GET['u']))

我正在尝试使用下面的代码查找正则表达式,但是只有在我不包含htmlspecialchars和括号的情况下,它才会出现。

I am trying to use the code below to find with Regular Expressions, but it only comes up if I don't include the htmlspecialchars and parentheses.


  • 查找:htmlspecialchars(\ $ _GET ['([[^'] *)'])

  • 替换:$ _GET ['$ 1']

有什么想法吗?谢谢!

推荐答案

() [ ] 需要转义。

isset\(htmlspecialchars\(\$_GET\['([^']*)'\]\)\)

这篇关于Dreamweaver正则表达式查找并替换为正则表达式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆