Questions tagged [delimiter]

A delimiter is a sequence of one or more characters used to specify the boundary between separate, independent regions in plain text or other data streams.

A delimiter (Wikipedia) is a sequence of one or more characters used to specify the boundary between separate, independent regions in plain text or other data streams. An example of a delimiter is the comma character, which acts as a field delimiter in a sequence of comma-separated values.

See also:

3001 questions
31
votes
4 answers

Can I use 2 or more delimiters in C++ function getline?

I would like to know how can I use 2 or more delimiters in the getline functon, that's my problem: The program reads a text file... each line is goning to be like: New Your, Paris, 100 CityA, CityB, 200 I am using getline(file, line), but I…
user6185425
30
votes
1 answer

Echo changes my tabs to spaces

I'm taking the following structure from around the net as a basic example of how to read from a file in BASH: cat inputfile.txt | while read line; do echo $line; done My inputfile.txt is tab-delimited, though, and the lines that come out of the…
Jenn D.
  • 1,045
  • 4
  • 13
  • 22
27
votes
8 answers

Delimiter to use within a query string value

I need to accept a list of file names in a query string. ie: http://someSite/someApp/myUtil.ashx?files=file1.txt|file2.bmp|file3.doc Do you have any recommendations on what delimiter to use?
Matthew Cole
  • 1,329
  • 2
  • 18
  • 30
27
votes
1 answer

D3 remove comma delimiters for thousands

I have a .json with 3 columns where one of them is 'Year'. The column contains only years. No dates!. When I am graphing it on the 'x' axis the years come out with a comma delimiter for thousands. So in the .json the date is this format…
Georgi
  • 287
  • 1
  • 6
  • 13
26
votes
3 answers

How do I explode an integer

the answer to this could be easy. But I'm very fresh to programming. So be gentle... I'm at work trying to do a quick fix for one of your customers. I want to get the total numbers of digits in a integer, and then explode the integer: rx_freq =…
chriscandy
  • 375
  • 1
  • 3
  • 7
22
votes
4 answers

bash: passing paths with spaces as parameters?

I have a bash script that recieves a set of files from the user. These files are sometimes under directories with spaces in their names. Unfortunately unlike this question all the filenames are passed via the command line interface. Let's assume the…
fbrereto
  • 35,429
  • 19
  • 126
  • 178
22
votes
2 answers

Escaping quotes and delimiters in CSV files with Excel

I try to import a CSV file in Excel, using ; as delimiters, but some columns contains ; and/or quotes. My problem is : I can use double quotes to ignore the delimiters for a specific string, but if there is a double quote inside the string, it…
Whin3
  • 675
  • 2
  • 9
  • 27
21
votes
4 answers

C# StreamReader, "ReadLine" For Custom Delimiters

What is the best way to have the functionality of the StreamReader.ReadLine() method, but with custom (String) delimiters? I'd like to do something like: String text; while((text = myStreamReader.ReadUntil("my_delim")) != null) { …
Eric
  • 2,098
  • 4
  • 30
  • 44
20
votes
3 answers

jQuery checkbox values to comma separated list

I have several checkboxes with a name array and I want the output of the checked boxes to be a variable with a comma separated list.
24creative
  • 709
  • 2
  • 9
  • 14
20
votes
6 answers

Delimiting binary sequences

I need to be able to delimit a stream of binary data. I was thinking of using something like the ASCII EOT (End of Transmission) character to do this. However I'm a bit concerned -- how can I know for sure that the particular binary sequence used…
Engineer
  • 8,529
  • 7
  • 65
  • 105
20
votes
2 answers

Replacing one character with another in a string

I have a data like below: A:B:C:D and I want to replace the C with data (say, Z) so that it may look like A:B:Z:D How can I do it?
combo
  • 201
  • 1
  • 2
  • 4
19
votes
5 answers

Java CSV parser with string separator (multi-character)

Is there any Java open source library that supports multi-character (i.e., String with length > 1) separators (delimiters) for CSV? By definition, CSV = Comma-Separated Values data with a single character (',') as the delimiter. However, many other…
PNS
  • 19,295
  • 32
  • 96
  • 143
19
votes
6 answers

Multiple delimiters in Scanner class of Java

How do I use the useDelimiter() method of the Scanner class to use both the comma (,) and the new line character (\n) as delimiters? I am parsing some text from a csv file.
tomejuan
  • 191
  • 1
  • 1
  • 3
19
votes
4 answers

MySQL: Split comma separated list into multiple rows

I have an unnormalized table with a column containing a comma separated list that is a foreign key to another table: +----------+-------------+ +--------------+-------+ | part_id | material | | material_id | name …
AndreKR
  • 32,613
  • 18
  • 106
  • 168
18
votes
7 answers

PHP - Best approach to detect CSV delimiter

I have seen multiple threads about what the best solution to auto detect the delimiter for an incoming CSV. Most of them are functions of length between 20 - 30 lines, multiple loops pre-determined list of delimiters, reading the first 5 lines and…
simon_www
  • 489
  • 2
  • 5
  • 13