ori = 'testing'
rep = 'posting'
file contents:
Line1 This is one line with some words for testing purposes
Line2 this is the seconds "testing" function.
Line3 that is one more " testing" line
Line4 "testing"
Line5 " testing"
Line6 "testing "
Line7 " testing "
我希望使用正则表达式作为简单而有效的方式而不是单独的功能来寻找以下结果。
Line1 This is one line with some words for testing purposes
Line2 this is the seconds "testing" function.
Line3 that is one more " testing" line
Line4 "posting"
Line5 " posting"
Line6 "posting "
Line7 " posting "
正则表达式魔术师可能会帮助我。
提前感谢。
我需要解决以下问题。我想替换一个动态字符串(如果在文件中找到),但前提是该字符串旁边有引号,或者在该字符串旁边,或者之间最多有两个空格,...