Skip to content

Instantly share code, notes, and snippets.

@yushiro
Created June 13, 2013 02:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yushiro/5770894 to your computer and use it in GitHub Desktop.
Save yushiro/5770894 to your computer and use it in GitHub Desktop.
c#中split分割字符串
用字符串分隔:
using System.Text.RegularExpressions;
string str="aaajsbbbjsccc";
string[] sArray=Regex.Split(str,"js",RegexOptions.IgnoreCase);
foreach (string i in sArray) Response.Write(i.ToString() + "<br>");
输出结果:
aaa
bbb
ccc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment