我终于能用谷歌搜中文了……
Geek Repo:Geek Repo
Github PK Tool:Github PK Tool
bcaso opened this issue 3 years ago · comments
经测试,在正则表达式中 ^ 符可有可无,$ 符不能用 如,我要屏蔽纯数字网站,结尾是 cn, com
/^https?:\/\/(www\.)?\d+\.(cn|com)/ 和 /https?:\/\/(www\.)?\d+\.(cn|com)/是可行的。
/^https?:\/\/(www\.)?\d+\.(cn|com)/
/https?:\/\/(www\.)?\d+\.(cn|com)/
但是 /^https?:\/\/(www\.)?\d+\.(cn|com)$/ 或 /https?:\/\/(www\.)?\d+\.(cn|com)$/ 都是不可行的。
/^https?:\/\/(www\.)?\d+\.(cn|com)$/
/https?:\/\/(www\.)?\d+\.(cn|com)$/