开发者

Regex to replace in files

I have to replace \ in files when the \ is not followed 开发者_如何学编程by "

so I made this regex to find occurrences with SublimeText:

#\\^"# but it doesn't work

Do someone has an idea ?

thanks


You can't use ^ to negate a symbol. That works only for groups marked with [] to say you mean the opposite. You can use a look-ahead expression to define that the next character may not be a quote: #\\(?!")# (Remember to escape the quote, if you use it in a string!)


You can try with following regex:

#[^\\]"#
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜