正则表达式提取第一个文件名

Regex extract the first file name

我想从这个url中提取第一个文件名: Endless_Curse_-_CE_v1.0.zip

[URL=https://google.com/fjhbqp5o5w06/Endless_Curse_-_CE_v1.0.zip]Endless 诅咒 - CE v1.0.zip - 10.4 MB[/URL]

(.*\/)([^\/]*)(\].*\[.*\])

第二组将是您的文件名:http://regex101.com/r/ehU7Ci/1

(.*\/)([^/]*)\](.*\[\/URL\])

这与您在 https://regexr.com/3nu8j

中作为第 2 组的文件名匹配