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.

How to split a string in Java

I have a string, "004-034556", that I want to split into two strings: string1="004"; string2="034556"; That means the first string …

java string split
How do I iterate over the words of a string?

I'm trying to iterate over the words of a string. The string can be assumed to be composed of words …

c++ string split
How to split a string into a list?

I want my Python function to split a sentence (input) and store each word in a list. My current code …

python list split text-segmentation
Parse (split) a string in C++ using string delimiter (standard C++)

I am parsing a string in C++ using the following: using namespace std; string parsed,input="text to be parsed"; …

c++ parsing split token tokenize
How can I convert a comma-separated string to an array?

I have a comma-separated string that I want to convert into an array, so I can loop through it. Is …

javascript string split
How do you split a list into evenly sized chunks?

I have a list of arbitrary length, and I need to split it up into equal size chunks and operate …

python list split chunks
How to convert comma-separated String to List?

Is there any built-in method in Java which allows us to convert comma separated String to some container (e.g …

java string collections split
Split string into an array in Bash

In a Bash script I would like to split a line into pieces and store them in an array. The …

arrays bash split
How to split a string into an array of characters in Python?

I've tried to look around the web for answers to splitting a string into an array of characters but I …

python split