正则匹配零宽断言不成功

使用问题 · 490 次浏览
fluctuating330 创建于 2024-05-26 19:12
正则提取各匹配项的值
[in]失败后中止动作【值/表达式】True
[in]提取方式【值/表达式】0
[in]输入【变量 text】[aist#0:0/pcm_f32le @ 0000022d4e8c5380] Guessed Channel Layout: stereo\r\n Input #0, wav, from '2024_0526_190258.wav':\r\n Duration: 00:00:57.20, bitrate: 3072 kb/s\r\n Stream #0:0: Audio: pcm_f32le ([3][0][0][0] / 0x0003), 48000 Hz, 2 channels, flt, 3072 kb/s\r\n Stream mapping:\r\n Stream #0:0 -> #0:0 (pcm_f32le (native) -> pcm_s24le (native))\r\n Press [q] to stop, [?] for help\r\n Output #0, null, to 'pipe:':\r\n Metadata:\r\n encoder : Lavf60.16.100\r\n Stream #0:0: Audio: pcm_s24le, 192000 Hz, stereo, s32, 9216 kb/s\r\n Metadata:\r\n encoder : Lavc60.31.102 pcm_s24le\r\n size= 0kB time=00:00:00.00 bitrate=N/A speed= 0x \rsize=N/A time=00:00:13.10 bitrate=N/A speed=24.4x \rsize=N/A time=00:00:27.40 bitrate=N/A speed=26.3x \rsize=N/A time=00:00:41.80 bitrate=N/A speed=27.1x \r[out#0/null @ 0000022d4e8d8b80] video:0kB audio:64350kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown\r\n size=N/A time=00:00:54.30 bitrate=N/A speed= 27x \r\n [Parsed_loudnorm_0 @ 0000022d4e927440] \r\n {\r\n \t"input_i" : "-21.13",\r\n \t"input_tp" : "-5.70",\r\n \t"input_lra" : "7.80",\r\n \t"input_thresh" : "-31.66",\r\n \t"output_i" : "-15.07",\r\n \t"output_tp" : "-1.00",\r\n \t"output_lra" : "7.20",\r\n \t"output_thresh" : "-25.54",\r\n \t"normalization_type" : "dynamic",\r\n \t"target_offset" : "-0.93"\r\n }\r\n
[in]正则表达式【值/表达式】(?="input_i" : ").+(?<=")
[in]忽略大小写【值/表达式】False
[in]单行模式【值/表达式】False
[in]多行模式【值/表达式】False
[in]从右向左【值/表达式】False
[out]匹配1=>input_i  "input_i" : "-21.13"
耗时:13ms
---------------------------------------------------------------------------------
上面是测试结果, 正则我用了零宽断言, 但是结果中把前后的判断词都返回了, 为什么, 我哪里写错了吗?
 

回复内容
CL 2024-05-26 20:10
#1

可能是想匹配组?


回复主贴