Re: Regex Help

2009-12-16 Thread Ghazal Gharooni
Is it what you want? StringTokenizer stk = new StringTokenizer("name:'zhong-guo' name:friend server:172.16.65.79"," ", false); for (int i = 0; i <= stk.countTokens()+1; i++) { result.add(stk.nextToken()); } On Tue, Dec 15, 2009 at 11:04 PM, Weiwei Wang wrote: > Same

Re: Regex Help

2009-12-15 Thread Weiwei Wang
Same reason, i do not know which delimiter regex to use:-( On Wed, Dec 16, 2009 at 3:02 PM, Ghazal Gharooni wrote: > Hello, > Why don't you use String Tokenizer for splitting the result? > > > On Tue, Dec 15, 2009 at 9:45 PM, Weiwei Wang wrote: > > I want to split this parsed result string: name

Re: Regex Help

2009-12-15 Thread Ghazal Gharooni
Hello, Why don't you use String Tokenizer for splitting the result? On Tue, Dec 15, 2009 at 9:45 PM, Weiwei Wang wrote: > I want to split this parsed result string: name:"zhong guo" name:friend > server:172.16.65.79 > > into > > name:"zhong guo" > name:friend > server:172.16.65.79 > > how can I

Regex Help

2009-12-15 Thread Weiwei Wang
I want to split this parsed result string: name:"zhong guo" name:friend server:172.16.65.79 into name:"zhong guo" name:friend server:172.16.65.79 how can I write a regular pattern to do that? I'm not familiar with regex and tried a few patterns which didn't work -- Weiwei Wang Alex Wang 王巍巍 R