Regex捕获URL [duplicate]中最后一个'/'之后的所有内容>> [

问题描述 投票:0回答:1
let url1 = "https://cdn0.tnwcdn.com/files/2020/01/exmaple1.jpg" let url2 = "http://www.clker.com/cliparts/1/7/b/9/11974343961963318467fl.png" let url3 = "https://images.squarespace-cdn.com/content/01+Seth+Easy+v1.gif"
我如何才能在上一个斜杠之后捕获所有内容,因此在这种情况下:exmaple1.jpg11974343961963318467fl.png01+Seth+Easy+v1.gif
让url1 =“ https://cdn0.tnwcdn.com/files/2020/01/exmaple1.jpg”让url2 =“ http://www.clker.com/cliparts/1/7/b/9/ 11974343961963318467fl.png”让url3 =“ https://images.squarespace-cdn.com/content/01 + ...
ios swift regex url
1个回答
2
投票
components(separatedBy:)
© www.soinside.com 2019 - 2024. All rights reserved.