doucu9677 2014-09-29 19:45
浏览 31
已采纳

REGEX:从URL中提取信息

I have the following URL: http://ecx.images-amazon.com/images/I/41zdz1zsG9L.SR38,50.jpg I need to extract the image ID, that is 41zdz1zsG9L (just until the dot). How do I do that with a regular expression? Thanks!

  • 写回答

1条回答 默认 最新

  • dp411805872 2014-09-29 19:48
    关注
    https?:\/\/.*\/([^.]*)
    

    Try this.Grab the capture.See demo.

    http://regex101.com/r/nA6hN9/32

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?