doucu9677
2014-09-29 19:45 阅读 26
已采纳

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 dp411805872 2014-09-29 19:48
    https?:\/\/.*\/([^.]*)
    

    Try this.Grab the capture.See demo.

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

    点赞 评论 复制链接分享

相关推荐