正则表达式记事本 ++ 查找带有排除的行

Regex Notepad ++ find lines with exclude

我如何找到线路:

`https://somesite.com/upload/file.jpg`

在 Notepad ++ 中使用正则表达式但排除

`https://somesite.com/upload/folder/file.jpg`

Select 从 https://somesite.com/upload/ 到 .jpg 但排除选择,如果两者之间将是“/”

我建议使用这种模式:

https?://.*/upload/[^/.]+\.jpg

这将匹配任何以路径 upload 结尾的 URL,然后是一些 JPEG 文件名。

Demo