Click here to Skip to main content
15,910,872 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
how to split the strng in javascript if there is no spaces between sepration?
for example:
i have to split the string by string :|:
and i have string like ::::
when i am trying to split the string then resulted as ::::
instead of array[4].
how can i do this in c# as well as javascript?
Posted
Updated 20-Jan-12 22:28pm
v2

1 solution

For JavaScript: http://www.w3schools.com/jsref/jsref_split.asp[^].

For .NET: http://msdn.microsoft.com/en-us/library/system.string.split.aspx[^].

In both cases, the separator is specified so there is no need in space characters. It's not clear what is your problem — all works properly.

—SA
 
Share this answer
 
Comments
Prashant Srivastava LKO 21-Jan-12 5:04am    
gud links sir
Sergey Alexandrovich Kryukov 21-Jan-12 12:31pm    
Thank you, Prashant.
--SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900