Created
June 13, 2013 02:47
-
-
Save yushiro/5770894 to your computer and use it in GitHub Desktop.
c#中split分割字符串
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
用字符串分隔: | |
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