C# 如何查找字符串
现在假设有一字符串为 
  "text[img]http://domainname/image.jpg[/img]text " 
 如何找到   [img]到[/img]之间的字符串    "http://domainname/image.jpg "? 
 除了自己写方法外,   .NET有提供相关的方法? 
 反正就是找个最简单的方法.
------解决方案--------------------string yourStr =  "text[img]http://domainname/image.jpg[/img]text "; 
 Match results = Regex.Match(yourStr,  "\\[img\\](.+?)\\[/img\\] ", RegexOptions.IgnoreCase); 
 Console.WriteLine(results.Groups[1].Value);
------解决方案--------------------string strTest= "text[img]http://domainname/image.jpg[/img]text ";   
 int intFront=strTest.LastIndexOf( "[img] ")+5; 
 int intBack=strTest.LastIndexOf( "[/img] "); 
 int intLength=strTest.Length;   
 int intStrLength=intLength-intFront-(intLength-intBack);  			 
 string strResult=strTest.Substring(intFront,intStrLength);   
 Response.Write(strResult);