开发者

PHP Regular expression to match unescaped double quotes

I'm trying to figure out a regular expression that will detect if there is an unescaped double quote within two double quotes. I have this, but it's not working:

if ( preg_match( '/^(\".*((?<!\\)\").*\")$/',开发者_开发百科 $str ) ) {
    die("hey");
}


Try with preg_match('/([^\\]\")/', $str)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜