zoukankan      html  css  js  c++  java
  • 获取字符串中img标签的url集合(转载)

    /// <summary> 
    /// 获取字符串中img的url集合 
    /// </summary> 
    /// <param name="content">字符串</param> 
    /// <returns></returns> 
    public static List<string> GetImgUrl(string content)
    {
    Regex rg = new Regex("src="([^"]+)"", RegexOptions.IgnoreCase);
    var img = rg.Match(content);
    List<string> imgUrl = new List<string>();
    while (img.Success)
    {
    imgUrl.Add(img.Groups[1].Value); 
    img = img.NextMatch();
    }
    return imgUrl;
    }

    忘记是从哪里弄的代码了,原作者看见留言一下,我会加上地址的

  • 相关阅读:
    if
    C#
    C#
    C#
    .net 5.0
    .net 5.0
    .net 5.0
    设计模式
    GAN网络中采用导向滤波的论文
    pytorch~多loss的选择
  • 原文地址:https://www.cnblogs.com/xiaomen/p/6252238.html
Copyright © 2011-2022 走看看