lpeg
如果字符串不在某个开始和结束分隔符之间,我想了解如何替换字符串。下面是一个示例,我想在其中使用SKIPstart
并SKIPstop
表示不应替换文本的位置。
rep
rep
SKIPstart
rep
rep
SKIPstop
rep
rep
至
new
new
SKIPstart
rep
rep
SKIPstop
new
new
这是另一个带有多个分隔符的示例:
rep
rep
SKIPstart
rep
rep
SKIPstop
rep
rep
SKIPstart
rep
rep
SKIPstop
至
new
new
SKIPstart
rep
rep
SKIPstop
new
new
SKIPstart
rep
rep
SKIPstop
并嵌套
rep
rep
SKIPstart
rep
SKIPstart
rep
SKIPstop
rep
SKIPstop
rep
rep
至
new
new
SKIPstart
rep
SKIPstart
rep
SKIPstop
rep
SKIPstop
new
new