Top "Split" questions

Use this tag for questions about separating an item (e.g. a string) into parts, often by a delimiter or regular expression.

Split array into chunks

Let's say that I have an Javascript array looking as following: ["Element 1","Element 2","Element 3",...]; // with close to a hundred elements. …

javascript arrays split
How to split a comma-separated string?

I have a String with an unknown length that looks something like this "dog, cat, bear, elephant, ..., giraffe" What would …

java string split
Split a String into an array in Swift?

Say I have a string here: var fullName: String = "First Last" I want to split the string base on white …

arrays swift string split
Easiest way to split a string on newlines in .NET?

I need to split a string into newlines in .NET and the only way I know of to split strings …

c# .net string split
How do I tokenize a string in C++?

Java has a convenient split method: String str = "The quick brown fox"; String[] results = str.split(" "); Is there an easy …

c++ string split tokenize
How do I split a string with multiple separators in javascript?

How do I split a string with multiple separators in JavaScript? I'm trying to split on both commas and spaces …

javascript regex split
Split Java String by New Line

I'm trying to split text in a JTextArea using a regex to split the String by \n However, this does …

java regex split newline
How can I split and parse a string in Python?

I am trying to split this string in python: 2.7.0_bf4fda703454 I want to split that string on the underscore _ …

python string parsing split
Split a string by another string in C#

I've been using the Split() method to split strings, but this only appears to work if you are splitting a …

c# .net string split
Turning a Comma Separated string into individual rows

I have a SQL Table like this: | SomeID | OtherID | Data +----------------+-------------+------------------- | abcdef-..... | cdef123-... | 18,20,22 | abcdef-..... | 4554a24-... | 17,19 | 987654-..... | 12324…

sql-server tsql split comma