我想要一个Python正则表达式来匹配不在简单引号之间的给定单词。我尝试过使用(?! ...)但没有成功。
在下面的屏幕截图中,我想匹配foe除第四行之外的所有内容。
另外,文本是作为一个大字符串给出的。
这是链接regex101,示例文本如下:
var foe = 10;
foe = "";
dark_vador = 'bad guy'
foe = ' I\'m your father, foe ! '
bar = thingy + foe
Run Code Online (Sandbox Code Playgroud)