当前位置: 动力学知识库 > 问答 > 编程问答 >

preg replace - Preg_match one word followed with double quotes

问题描述:

I searched all the web but did not solve my problem.

I need a regular expression to match or replace a word folowed with a double quote.

Example :

uniquehereuniqueyouunique"can"uniquegetuniquefoounique"bar"

I need to replace all unique" by something (ex notunique). I tried :

preg_replace("/unique\"/", 'notunique', $contents);

but that don't match.

thanks for your help

网友答案:

I found it !

preg_replace('/unique."/', 'notunique', $contents);
分享给朋友:
您可能感兴趣的文章:
随机阅读: