在我使用的网站上手动下载图像的语法例如是:
https://www.newspapers.com/download/image/?type=jpg&id=999
但是,我有一堆网址错误,例如:
https://www.newspapers.com/image/999/?terms=randomletters或https://www.newspapers.com/image/999/?terms=randomnumbers
如何让notepad ++删除图像ID之后的所有内容(在此示例中为999),并将URL重构为正确的语法,如第一个示例所示?
答案 0 :(得分:0)
ctrl
+ h
搜索模式:正则表达式
查找:^https://www.newspapers.com/image/([0-9]+)/\?terms=.+
替换:https://www.newspapers.com/download/image/?type=jpg&id=$1