这是一个创建于 3236 天前的主题,其中的信息可能已经有所发展或是发生改变。
Google 查到的都是无效或者不是想要的
要求可以匹配 magnet:?xt=urn:btih:D2360003C0040BC98A6D9C4A136522FBE7FCAFFA 短的
也可以匹配后面跟一大堆的如 magnet:?xt=urn:btih:8AC3731AD4B039C05000B5404AFA6E7397810B41&dn=ubuntu+11+10+oneiric+ocelot+desktop+cd+i386&tr=http%3A%2F%2Ftracker.openbittorrent.com%2
PS.都是无效地址 ////
6 条回复 • 2022-02-08 13:01:45 +08:00
![ChoateYao](https://cdn.v2ex.com/gravatar/0ea39340e3d14bedfacc3f78cd4e3e57?s=48&d=retro) |
|
1
ChoateYao 2015-08-16 22:05:56 +08:00 1
```code ^(magnet:\?xt=urn:btih:)[0-9a-zA-Z]{40}.*$ ```
|
![line](https://cdn.v2ex.com/avatar/7a1d/999b/67163_normal.png?m=1637328239) |
|
2
line 2015-08-16 22:35:50 +08:00 1
^(magnet:\?xt=urn:btih:)[0-9a-zA-Z]{40,}
|
![popok](https://cdn.v2ex.com/avatar/78cb/ef27/98436_normal.png?m=1495217854) |
|
3
popok 2015-08-17 09:26:30 +08:00 4
@ ChoateYao @ line 然而HASH值0-9A-F,就不会有G-Z ^(magnet:\?xt=urn:btih:)[0-9a-fA-F]{40}.*$
|
![ChoateYao](https://cdn.v2ex.com/gravatar/0ea39340e3d14bedfacc3f78cd4e3e57?s=48&d=retro) |
|
4
ChoateYao 2015-08-17 09:46:34 +08:00 1
@ popok 没有具体了解过去,楼主只是求个正则而已。感谢你,让我又学到一个知识。
|
![WordTian](https://cdn.v2ex.com/gravatar/730c8f5e3ffbe7511548ba0c564e0877?s=48&d=retro) |
|
6
WordTian 2022-02-08 13:01:45 +08:00
(magnet:\?)(&|xt=urn:btih:[0-9a-fA-F]{40}|tr=[^\s&]*|dn=[^\s&]*|mt=[^\s&]*|kt=[^\s&]+
|