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 delimited string into an array in awk?

How to split the string when it contains pipe symbols | in it. I want to split them to be in …

string unix awk split
Java string split with "." (dot)

Why does the second line of this code throw ArrayIndexOutOfBoundsException? String filename = "D:/some folder/001.docx"; String extensionRemoved = filename.split(".")[0]; …

java regex string split indexoutofboundsexception
T-SQL split string

I have a SQL Server 2008 R2 column containing a string which I need to split by a comma. I have …

sql sql-server tsql sql-server-2008 split
Split a string by a delimiter in python

How to split this string where __ is the delimiter MATCHES__STRING To get an output of ['MATCHES', 'STRING']?

python string list split
Split data frame string column into multiple columns

I'd like to take data of the form before = data.frame(attr = c(1,30,4,6), type=c('foo_and_bar','foo_and_…

r string dataframe split r-faq
Java split string to array

I need help with the split() method. I have the followingString: String values = "0|0|0|1|||0|1|0|||"; I need to put the values into …

java string split
How to split one string into multiple strings separated by at least one space in bash shell?

I have a string containing many words with at least one space between each two. How can I split the …

bash shell string split
How to split a string in shell and get the last field

Suppose I have the string 1:2:3:4:5 and I want to get its last field (5 in this case). How do I do …

bash split tokenize cut
Split string every nth character?

Is it possible to split a string every nth character? For example, suppose I have a string containing the following: …

python string split
Split list into smaller lists (split in half)

I am looking for a way to easily split a python list in half. So that if I have an …

python list split