我有一个以下格式的 m3u 文件:
#EXTM3U url-tvg=""
#EXTINF:-1 tvg-id="Sansad.TV.in" tvg-name="Loksabha TV" tvg-
logo="https://static.wikia.nocookie.net/logopedia/images/9/97/
Sansad_TV.jpg" group-title="News-Hindi",Loksabha TV
https://hls.media.nic.in/live/lstv/index.m3u8
#EXTINF:-1 tvg-id="Sansad.TV.-.Rajya.Sabha.in" tvg-
name="Rajyasabha TV" tvg-logo="https://
static.wikia.nocookie.net/logopedia/images/9/97/Sansad_TV.jpg"
group-title="News-Hindi",Rajyasabha TV
https://hls.media.nic.in/live/rstv/index.m3u8
...so on
我想添加单词“(FHD)”,以便输入变成:
#EXTM3U url-tvg=""
#EXTINF:-1 tvg-id="Sansad.TV.in" tvg-name="Loksabha TV (FHD)"
tvg-logo="https://static.wikia.nocookie.net/logopedia/
images/9/97/Sansad_TV.jpg" group-title="News-Hindi",Loksabha TV
(FHD)
https://hls.media.nic.in/live/lstv/index.m3u8
#EXTINF:-1 tvg-id="Sansad.TV.-.Rajya.Sabha.in" tvg-
name="Rajyasabha TV (FHD)" tvg-logo="https://
static.wikia.nocookie.net/logopedia/images/9/97/Sansad_TV.jpg"
group-title="News-Hindi",Rajyasabha TV (FHD)
https://hls.media.nic.in/live/rstv/index.m3u8
...so on
我已尝试过:
Regular expression: (?s-i)(?<=tvg-name=").+?(?=") allows me to
select to find the text in whole file.
但是我找不到替换它的表达式,也找不到在所需输出中所示的每个交替偶数行后添加“(FHD)”的正则表达式。
请注意:#EXTINF:......... 在 notepad++ 中只有一行。