删除记事本++正则表达式上两个模式之间的行
deleting lines in between two patterns on notepad++ regex
(?<=] = {)(.*\n?)(?=\},)
这就是我想出的,我是这个正则表达式的新手。我想要做的是在“] = {”之后和“}”之前删除 texts/lines,
问题是,每当我搜索“(?<=] = {)(.*\n?)(?=},)”时,我的很多行都会重复,它会突出显示最上面的“] = {”和最底部的“}”。我希望它突出显示 'NEXT'“}”。对不起,如果我不能让自己更清楚。英语不是我的母语。泰!
这是我需要编辑的文本文件的 0.01%。
[502] = {
unidentifiedDescriptionName = {
"A potion made from grinded Red and Yellow Herbs that restores ^000088about 105 HP^000000.",
"^ffffff_^000000",
"Weight: ^77777710^000000"
},
identifiedDisplayName = "Orange Potion",
identifiedResourceName = "주홍포션",
identifiedDescriptionName = {
"A potion made from grinded Red and Yellow Herbs that restores ^000088about 105 HP^000000.",
"^ffffff_^000000",
"Weight: ^77777710^000000"
},
slotCount = 0,
ClassNum = 0
},
[503] = {
unidentifiedDescriptionName = {
"A potion made from grinded Yellow Herbs that restores about ^000088175 HP^000000.",
"^ffffff_^000000",
"Weight: ^77777713^000000"
},
identifiedDisplayName = "Yellow Potion",
identifiedResourceName = "노란포션",
identifiedDescriptionName = {
"A potion made from grinded Yellow Herbs that restores about ^000088175 HP^000000.",
"^ffffff_^000000",
"Weight: ^77777713^000000"
},
slotCount = 0,
ClassNum = 0
},
我需要删除从 [502] = { 到 },在 'identifieddisplayname'.
之前的行
有什么想法吗?提前致谢!这是我的第一个post! :D
你非常接近:
查找内容:(?<=] = {)(.*?)(?=\},)
替换为:NOTHING
确保您已检查 . matches newline
(?<=] = {)(.*\n?)(?=\},)
这就是我想出的,我是这个正则表达式的新手。我想要做的是在“] = {”之后和“}”之前删除 texts/lines,
问题是,每当我搜索“(?<=] = {)(.*\n?)(?=},)”时,我的很多行都会重复,它会突出显示最上面的“] = {”和最底部的“}”。我希望它突出显示 'NEXT'“}”。对不起,如果我不能让自己更清楚。英语不是我的母语。泰!
这是我需要编辑的文本文件的 0.01%。
[502] = {
unidentifiedDescriptionName = {
"A potion made from grinded Red and Yellow Herbs that restores ^000088about 105 HP^000000.",
"^ffffff_^000000",
"Weight: ^77777710^000000"
},
identifiedDisplayName = "Orange Potion",
identifiedResourceName = "주홍포션",
identifiedDescriptionName = {
"A potion made from grinded Red and Yellow Herbs that restores ^000088about 105 HP^000000.",
"^ffffff_^000000",
"Weight: ^77777710^000000"
},
slotCount = 0,
ClassNum = 0
},
[503] = {
unidentifiedDescriptionName = {
"A potion made from grinded Yellow Herbs that restores about ^000088175 HP^000000.",
"^ffffff_^000000",
"Weight: ^77777713^000000"
},
identifiedDisplayName = "Yellow Potion",
identifiedResourceName = "노란포션",
identifiedDescriptionName = {
"A potion made from grinded Yellow Herbs that restores about ^000088175 HP^000000.",
"^ffffff_^000000",
"Weight: ^77777713^000000"
},
slotCount = 0,
ClassNum = 0
},
我需要删除从 [502] = { 到 },在 'identifieddisplayname'.
之前的行有什么想法吗?提前致谢!这是我的第一个post! :D
你非常接近:
查找内容:(?<=] = {)(.*?)(?=\},)
替换为:NOTHING
确保您已检查 . matches newline