我需要找到一个正则表达式或PythonScript函数来在第一行的第一个字符之前和最后一行的最后一个字符之后添加文本。有什么想法吗?
答案 0 :(得分:0)
怎么样:
找到:(.+)
替换为:DEBUT$1FIN
确保选中Regular Expression
并Dot matches newline
然后clic on 全部替换
答案 1 :(得分:0)
这适用于PythonScript:
// Add the text "foo" before the first character
editor.insertText(0, "foo")
// Add the text "bar" after the last character
editor.insertText(editor.getLength(), "bar")