所以我是正则表达式的新手,我在这里遇到了这个问题。
我需要用逗号分隔的多行替换一些数据。但它应该跳过开头的行Style: sign
。
例:
这些是数据的含义(用逗号分隔,只是为了显示它代表什么)。
Format: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, OutlineColour, BackColour, Bold, Italic, Underline, StrikeOut, ScaleX, ScaleY, Spacing, Angle, BorderStyle, Outline, Shadow, Alignment, MarginL, MarginR, MarginV, Encoding
必须更换的东西是:( Bold
到0)和ScaleX
(到85)
这是需要更换一些东西的整个文本块。
Style: main,Arial,23,&H00FFFFFF,&H000000FF,&H00000000,&H00000000,-1,0,0,0,100,100,0,0,1,1.35,0,2,10,10,20,1
Style: italics,Arial,23,&H00FFFFFF,&H000000FF,&H004E2C2A,&H00000000,-1,-1,0,0,100,100,0,0,1,1.35,0,2,10,10,20,1
Style: sign_1330_2_K_a_t_a_g_i_r_i_,Trebuchet MS,12,&H00C1D8BF,&H000000FF,&H004D973B,&H00000000,-1,0,0,0,100,100,0,17,1,3,0,8,30,375,80,1
Style: sign_1446_5_K_a_g_a_r_i___A_,Trebuchet MS,12,&H00F1FBE9,&H000000FF,&H004F963D,&H00000000,-1,0,0,0,100,100,0,-15,1,3,0,2,335,30,100,1
Style: sign_2051_16_M_a_t_s_u_o___M_,Trebuchet MS,12,&H00C1D8BF,&H000000FF,&H004D973B,&H00000000,-1,0,0,0,100,100,0,7,1,3,0,8,162,468,64,1
Style: sign_2163_16_Schleich,Times New Roman,16,&H0021110C,&H000000FF,&H007D594A,&H00000000,-1,0,0,0,100,100,0,-10,1,3,0,8,67,507,25,1
这应该是结果:
Style: main,Arial,23,&H00FFFFFF,&H000000FF,&H00000000,&H00000000,0,0,0,0,85,100,0,0,1,1.35,0,2,10,10,20,1
Style: italics,Arial,23,&H00FFFFFF,&H000000FF,&H004E2C2A,&H00000000,0,-1,0,0,85,100,0,0,1,1.35,0,2,10,10,20,1
Style: sign_1330_2_K_a_t_a_g_i_r_i_,Trebuchet MS,12,&H00C1D8BF,&H000000FF,&H004D973B,&H00000000,-1,0,0,0,100,100,0,17,1,3,0,8,30,375,80,1
Style: sign_1446_5_K_a_g_a_r_i___A_,Trebuchet MS,12,&H00F1FBE9,&H000000FF,&H004F963D,&H00000000,-1,0,0,0,100,100,0,-15,1,3,0,2,335,30,100,1
Style: sign_2051_16_M_a_t_s_u_o___M_,Trebuchet MS,12,&H00C1D8BF,&H000000FF,&H004D973B,&H00000000,-1,0,0,0,100,100,0,7,1,3,0,8,162,468,64,1
Style: sign_2163_16_Schleich,Times New Roman,16,&H0021110C,&H000000FF,&H007D594A,&H00000000,-1,0,0,0,100,100,0,-10,1,3,0,8,67,507,25,1
开头的线Style: sign
应该保持不变,就像我之前写的那样。它也可以在两个或多个命令中完成。它不一定是单行。
谁能在这帮助我?
1
我真的没有得到输入和输出之间的区别。请编辑您的问题并添加更多输入行,混合可修改和不可修改,(格式正确)和预期结果(格式正确)
—
Toto
当然,请给我片刻
—
Tammys Head
好的,这应该会好得多。
—
Tammys Head