Replace all occurrences of this regex with the empty String:
;(?=[^{}]*})
This matches a semicolon but only when followed by 0 or more characters that are not {
or }
then a }
, which is the same as saying “only when the next curly brace character is a close curly brace”
As code:
line = Regex.Replace(line, ";(?=[^{}]*})", "");
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…