如何匹配不包含字符的正则表达式中的模式?

时间:2019-08-08 06:42:34

标签: regex bash sed

我想匹配#replaces "anything".format with FOO sed s/\".*\"\.format(/FOO/g ,但是当我写

"hey" some stuff "Hello {}".format(

它匹配最长的匹配模式,例如.format

我想匹配最接近\".*(but no double quotes in between)\".format(的一对双引号。我正在寻找类似TypeORM connection error: error: password authentication failed for user "user".

的东西

那么如何匹配不包含“”的模式?

0 个答案:

没有答案