Posted on 2009-07-17 13:29
Hero 阅读(818)
评论(0) 编辑 收藏 引用 所属分类:
C#积累
1 using System;
2 using System.Collections.Generic;
3 using System.Text;
4 using System.Text.RegularExpressions;
5
6 namespace stringtest
7 {
8 class Program
9 {
10 static void Main( string[] args )
11 {
12 //string instr;
13 //instr = System.Console.ReadLine();
14
15 string[] words = Regex.Split( "wwww aaaa aaaaaaaaaa aaaaaaaaa aaaaaaaaaaa", @"[ ]+" );
16
17 foreach ( string word in words )
18 {
19 Console.WriteLine( word );
20 }
21
22 Console.ReadLine();
23 }
24 }
25 }
26