Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

频道名称模糊匹配 #43

Open
anter2024 opened this issue Jan 22, 2025 · 3 comments
Open

频道名称模糊匹配 #43

anter2024 opened this issue Jan 22, 2025 · 3 comments

Comments

@anter2024
Copy link

大佬,请教个问题没看懂那个正则表达式是什么意思?各个数据源个人习惯不同设置的名称各异,比如CCTV1,有CCTV-1,CCTV1综合,CCTV-1综合,CCTV1综合频道,CCTV-1综合频道。我应该如何设置。谢谢!

@anter2024
Copy link
Author

主要是CCTV这17个频道,如何一次性设置好

@taksssss
Copy link
Owner

默认内置的正则表达式就是处理CCTV的。

CCTV$1 => regex:/^CCTV[-\s]*(\d{1,2}(\s*P(LUS)?|[K\+])?)(?![\s-]*(美洲|欧洲)).*/i

这里的意思是将右边的替换成左边的。基本涵盖所有情况了。

@taksssss
Copy link
Owner

具体正则表达式的规则,你问AI会比较清晰。

所有CCTV相关的频道都会处理成类似于 CCTV1、CCTV5+、CCTV5PLUS、CCTV4K 这样的形式。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants