public void getImgs(string _html) { Regex rxImages = new Regex("<img.+?src=[\"'](.+?)[\"'].+?>", RegexOptions.IgnoreCase & RegexOptions.IgnorePatternWhitespace); MatchCollection mc = rxImages.Matches(_html); foreach(Match m in mc) { Console.WriteLine(m.Groups[0].Value); Console.WriteLine(m.Groups[1].Value); } } result: 0: < img src = "http://yeonpil.org/소녀시대.jpg" / > 1: http: //yeonpil.org/소녀시대.jpg
2012/07/11
c#, html 에서 img src 경로 가져오기
가장 많이 본 글
-
처리되지 않은 예외: System.Security.Authentication.AuthenticationException: SSPI를 호출하지 못했습니다. 내부 예외를 참조하십시오. ---> System.ComponentModel.Win32Exce...
-
다음 오류 때문에 네트워크 로드 균형 조정 서비스를 시작하지 못했습니다: 서비스를 사용할 수 없거나 서비스와 연관되어 사용 가능한 장치가 없기 때문에 서비스를 시작할 수 없습니다. 네트워크 로드 균형 조정을 시스템에 설치하지 않았습니다.
-
http://blogs.technet.com/askperf/archive/2007/07/13/troubleshooting-a-windows-installer-issue.aspx Windows Installer(*.msi, MSIserver) 는 msi...
댓글 없음:
댓글 쓰기