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.

Splitting a semicolon-separated string to a dictionary, in Python

I have a string that looks like this: "Name1=Value1;Name2=Value2;Name3=Value3" Is there a built-in class/function …

python string dictionary split
How can I split and trim a string into parts all on one line?

I want to split this line: string line = "First Name ; string ; firstName"; into an array of their trimmed versions: "First …

c# .net split trim
How to split a string value based on a delimiter in DB2

How do you split a string value in DB2? For example, given the value: CHG-FFH. I want to split on …

split db2
Regex for splitting a string using space when not surrounded by single or double quotes

I'm new to regular expressions and would appreciate your help. I'm trying to put together an expression that will split …

java regex split
Split one file into multiple files based on delimiter

I have one file with -| as delimiter after each section...need to create separate files for each section using …

linux unix awk split
Split string by a character?

How can I split a string such as "102:330:3133:76531:451:000:12:44412 by the ":" character, and put all of the numbers into an int …

c++ arrays string split tokenize
How can I swap positions of two open files (in splits) in vim?

Assume I've got some arbitrary layout of splits in vim. ____________________ | one | two | | | | | |______| | | three| | | | |___________|______| Is there a way to swap one …

layout editor split vim
Split string with dot as delimiter

I am wondering if I am going about splitting a string on a . the right way? My code is: String[] …

java regex string split
Split comma separated values of a column in row, through Oracle SQL query

I have a table like below: ------------- ID | NAME ------------- 1001 | A,B,C 1002 | D,E,F 1003 | C,E,G ------------- …

sql oracle split comma
AttributeError: 'list' object has no attribute 'split'

Using Python 2.7.3.1 I don't understand what the problem is with my coding! I get this error: AttributeError: 'list' object has …

python python-2.7 split attributeerror