首页 > 技术文章 > c# 正则

yinmu 2019-06-10 14:07 原文

第一种:

 

Regex reg = new Regex(“”);

string htmlCode = "(?<= src=\").*(?=\" alt)";

Match match = reg.Match(htmlCode);

string url = match.value;

推荐阅读