日期:2014-05-17 浏览次数:21142 次
string Example = "abcdefff";
string begin_str = "e";
string result = Regex.Match(Example, begin_str + @".*?$").Value;//efff
------解决方案--------------------
contains判断,indexof位置
substring截取
------解决方案--------------------
string str1 = "asdcd";
string str2 = str1.Remove(0, str1.IndexOf('s'));
------解决方案--------------------
string str = "abcdeaksdaslkd";
str = str.Substring(str.IndexOf('d'), str.Length - str.IndexOf('d'));
------解决方案--------------------
static void Main(string[] args)
{
string str = "485269";
char c = '8';
Console.WriteLine(str.Substring(str.IndexOf(c)));
Console.ReadLine();
}