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
92
votes
21 answers

Split a string into an array of strings based on a delimiter

I'm trying to find a Delphi function that will split an input string into an array of strings based on a delimiter. I've found a lot from searching the web, but all seem to have their own issues and I haven't been able to get any of them to work. I…
Ryan
  • 7,733
  • 10
  • 61
  • 106
91
votes
5 answers

Convert commas decimal separators to dots within a Dataframe

I am importing a CSV file like the one below, using pandas.read_csv: df = pd.read_csv(Input, delimiter=";") Example of CSV file: 10;01.02.2015 16:58;01.02.2015 16:58;-0.59;0.1;-4.39;NotApplicable;0.79;0.2 11;01.02.2015 16:58;01.02.2015…
Nautilius
  • 1,581
  • 2
  • 12
  • 14
89
votes
3 answers

Split comma separated column data into additional columns

I have comma separated data in a column: Column ------- a,b,c,d I want to split the comma separated data into multiple columns to get this output: Column1 Column2 Column3 Column4 ------- ------- ------- ------- a b c d…
Gallop
  • 1,365
  • 3
  • 16
  • 28
82
votes
13 answers

Capturing output of find . -print0 into a bash array

Using find . -print0 seems to be the only safe way of obtaining a list of files in bash due to the possibility of filenames containing spaces, newlines, quotation marks etc. However, I'm having a hard time actually making find's output useful within…
Idris
  • 1,887
  • 1
  • 14
  • 9
76
votes
12 answers

What's the best separator/delimiter character(s) for a plaintext db file?

What's the best separator/delimiter character(s) for a plaintext db file? I considered using |, ,, , ;, etc. But they all seem to be possible to break when the nearby entries have special enough characters. So, the experienced database users,…
Meng Lu
  • 13,726
  • 12
  • 39
  • 47
76
votes
10 answers

JS string.split() without removing the delimiters

How can I split a string without removing the delimiters? Let's say I have a string: var string = "abcdeabcde"; When I do var newstring = string.split("d"), I get something like this: ["abc","eabc","e"] But I want to get…
Martin Janiczek
  • 2,996
  • 3
  • 24
  • 32
67
votes
5 answers

Reading null delimited strings through a Bash loop

I want to iterate through a list of files without caring about what characters the filenames might contain, so I use a list delimited by null characters. The code will explain things better. # Set IFS to the null character to hopefully change the…
Matthew
  • 6,351
  • 8
  • 40
  • 53
67
votes
3 answers

How do I use a delimiter with Scanner.useDelimiter in Java?

sc = new Scanner(new File(dataFile)); sc.useDelimiter(",|\r\n"); I don't understand how delimiter works, can someone explain this in layman terms?
NoMoreErrors
  • 1,203
  • 2
  • 13
  • 14
65
votes
1 answer

Angular JS custom delimiter

How do I use a custom delimiter for angular JS? I'd like to change from the {{ var }} syntax to [[ var ]]. Can somebody show me a complete example on how to implement this with Angular?
Azri Jamil
  • 2,394
  • 2
  • 29
  • 37
62
votes
6 answers

Delphi: StringList Delimiter is always a space character even if Delimiter is set

I am having trouble with the delimiter in the TStringList Class. Take a look: var s: string; sl: TStringList; begin sl := TStringList.Create; s := 'Users^foo bar^bar foo^foobar^barfoo'; sl.Delimiter := '^'; sl.DelimitedText := s; …
Acron
  • 1,378
  • 3
  • 20
  • 32
61
votes
1 answer

What does the random string after a WebKitFormBoundary do \ mean?

I'm trying to use a BI tool to automate a process which extracts data from our DB system, and then upload it to a web site via HTTP POST. The BI Tool I'm using allows me to build the Request up as a text object which it will then send to the web…
Hampo
  • 753
  • 2
  • 6
  • 6
56
votes
2 answers

Is it possible to use AngularJS with the Jinja2 template engine?

I have a Flask site and I want to use the AngularJS JavaScript framework. Unfortunately, it seems as if the delimiters overlap. How do I use Angular with Jinja2 if both rely on double curly braces ({{ expr }})? Is it even possible?
user559633
55
votes
5 answers

Convert a delimted string to a dictionary in C#

I have a string of the format "key1=value1;key2=value2;key3=value3;" I need to convert it to a dictionary for the above mentioned key value pairs. What would be the best way to go about this? Thanks.
S G
  • 551
  • 1
  • 4
  • 3
54
votes
6 answers

Can I import a CSV file and automatically infer the delimiter?

I want to import two kinds of CSV files, some use ";" for delimiter and others use ",". So far I have been switching between the next two lines: reader=csv.reader(f,delimiter=';') or reader=csv.reader(f,delimiter=',') Is it possible not to specify…
rom
  • 3,592
  • 7
  • 41
  • 71
52
votes
4 answers

changing the delimiter for cin (c++)

I've redirected "cin" to read from a file stream cin.rdbug(inF.rdbug()) When I use the extraction operator it reads until it reaches a white space character. Is it possible to use another delimiter? I went through the api in cplusplus.com, but…
yotamoo
  • 5,334
  • 13
  • 49
  • 61