473,471 Members | 2,005 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

split string with tab separator

how to split the string which the separator is TAB.e.g.
string a = "abc bcd abc";
a.split('Tab');

Does it need to use some special character...which like vbTab in VB6...

Million Thanks
Nov 16 '05 #1
2 27354
"\t"

Grey wrote:
how to split the string which the separator is TAB.e.g.
string a = "abc bcd abc";
a.split('Tab');

Does it need to use some special character...which like vbTab in VB6...

Million Thanks

Nov 16 '05 #2
On Wed, 14 Apr 2004 16:41:42 +0800, Grey <er*****@i-cable.com> wrote:
how to split the string which the separator is TAB.e.g.
string a = "abc bcd abc";
a.split('Tab');

Does it need to use some special character...which like vbTab in VB6....

Million Thanks


Hi Grey,

That special character is '\t'

string[] list = a.Split(new char[]{'\t'});

Happy coding!
Morten Wennevik [C# MVP]
Nov 16 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: Carlos Ribeiro | last post by:
Hi all, While writing a small program to help other poster at c.l.py, I found a small inconsistency between the handling of keyword parameters of string.split() and the split() method of...
5
by: Arjen | last post by:
Hi All, What I want to is using a string as PATTERN in a split function. This makes it possible for me to change the PATTERN on one place in my script... For example: $separator = ";"; $line...
2
by: Hai Xu | last post by:
Hi, I ahve a string string="ThisAAaAAteAAAAst" now, I want to split it using "AA" as separator, say @str = split(/AA/, $string); however, I want to leave any AA+ as it is, that is, AAAA and...
4
by: Henry Chen | last post by:
Hi, I have a string that needs to be parsed into the string. The separator is not char. It is something like " at ". With current string.Split function, it doesn't work. Is there any exist...
3
by: Rico | last post by:
If there are consecutive occurrences of characters from the given delimiter, String.Split() and Regex.Split() produce an empty string as the token that's between such consecutive occurrences. It...
4
by: Michele Petrazzo | last post by:
Hello ng, I don't understand why split (string split) doesn't work with the same method if I can't pass values or if I pass a whitespace value: >>> "".split() >>> "".split(" ") But into...
8
by: ronrsr | last post by:
I'm trying to break up the result tuple into keyword phrases. The keyword phrases are separated by a ; -- the split function is not working the way I believe it should be. Can anyone see what I"m...
10
by: vunet.us | last post by:
Hello, I use XMLHTTP to get an HTML of another page. Then, I need to cut some middle part of that HTML string but I have problems doing it (see note in caps below). The error I have generated at...
0
by: John | last post by:
Hi I have written a function to split a string into sub strings of a given fixed max length. This is useful for example in breaking a long message into multiple strings of up to 160 characters...
5
by: Steve | last post by:
I understand that string.split() should produce an array from a string. However when I use the following script the type of the result is indeed an object but the array elements are undefined. Why?...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.