简体   繁体   English

在Dreamweaver中搜索并用正则表达式替换

[英]Search and replace with regex in dreamweaver

Can anybody help me with following 有人可以帮我以下吗

I have several variables like 我有几个像

$customer = $this->input->post('UserId_2');

and I need to replace with 我需要替换为

$customer = $this->input->post('UserId_2', TRUE);

I am using the following RegEx to search which matches all the occurrences 我正在使用以下正则表达式来搜索与所有匹配项匹配的项

\$this->input->post\(\'\w*\'\);

But I am unable to replace. 但是我无法替代。 I have tried $1 but it doesn't help 我尝试过$ 1,但无济于事

You don't have a capture group so $1 is empty. 您没有捕获组,因此$1为空。 Use: 采用:

\$this->input->post\('(\w*)'\);

with

$this->input->post('$1', TRUE);

DW屏幕截图

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM