string s="abcdddsfj32q2gh.ds/?fgrend" int length=s.length-2; s.substring(4,length);
string s= "abcdddsfj32q2gh.ds/?fgrend " int length=s.length-2; s.substring(4,length);这个不行会有错误
using System.Text.RegularExpressions; ..... Match match = Regex.Match(str,@"abcd([\s\S]*?)end",RegexOptions.IgnoreCase); if(match.Success)return match.Groups[1].Value;
你是要知道它的位置吧,可以用IndexOf试试!
int length=s.length-2;
s.substring(4,length);
int length=s.length-2;
s.substring(4,length);这个不行会有错误
.....
Match match = Regex.Match(str,@"abcd([\s\S]*?)end",RegexOptions.IgnoreCase);
if(match.Success)return match.Groups[1].Value;