我想我至少對我的問題有幾個答案:
我的大部分問題其實是由我執行的一個自訂腳本造成的。在結尾而非開頭執行該腳本,讓我的 changes.txt 編輯得以生效。我不確定為什麼,但這似乎是答案。
此外,我認為「.」無法捕捉換行。[.\r\n] 和 [\s\S] 似乎都能捕捉所有內容。
出於某種我完全無法理解的原因,這個運作了:
'\\v \d+ LATER([\s\S]*?)(?=\\v)' > ''
但這個沒有運作
'\\v \d+ LATER([\s\S]*?)\\v' > '\\v '
[離題抱怨:我真的很懷念論壇允許使用 Markdown 的時候。]
I think I have at least a few answers to my question:
Most of my problem was actually caused by a custom script I was running. Running the script at the end, rather than the beginning, allowed my changes.txt edits to take place. I'm not sure why, but that seems to be the answer.
Also, I think that "." doesn't capture new lines. Both [.\r\n] and [\s\S] seem to work to capture everything.
For some reason that I really don't understand, this worked:
'\\v \d+ LATER([\s\S]*?)(?=\\v)' > ''
but this didn't
'\\v \d+ LATER([\s\S]*?)\\v' > '\\v '
[Side rant: I really miss when the forum allowed Markdown.]
機器翻譯自 English