tagged [split]

How do I split a list based on index in C#?

How do I split a list based on index in C#? I have a list with around 190 elements in it for now. How can I split the list into smaller lists with a max of 50 elements in each list? The result could b...

17 Sep at 17:54

Split comma separated column data into additional columns

Split comma separated column data into additional columns I have comma separated data in a column: I want to split the comma separated data into multiple columns to get this output: How can this be ac...

How to split an array into chunks of specific size?

How to split an array into chunks of specific size? Afternoon, I need to split an array into smaller "chunks". I am passing over about 1200 items, and need to split these into easier to handle arrays ...

28 Sep at 10:49

How do I split a delimited string so I can access individual items?

How do I split a delimited string so I can access individual items? Using SQL Server, how do I split a string so I can access item x? Take a string "Hello John Smith". How can I split the string by sp...

13 Jun at 15:19

Regular expression to split string and number

Regular expression to split string and number I have a string of the form: Is there a regular expression that can be used with [Regex.Split()](http://msdn.microsoft.com/en-us/library/system.text.regul...

15 Sep at 17:8

Split string every nth character?

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: How can I get it to look like this: --- [How do I...

2 Oct at 01:4

How do I split a string in Java?

How do I split a string in Java? I want to split the string `"004-034556"` into two strings by the delimiter `"-"`: That means the first string will contain the characters before `'-'`, and the second...

24 Jul at 23:41

Select last element quickly after a .Split()

Select last element quickly after a .Split() I have this code : and I'd like to store in `stringCutted` the last element of the `string[]` after the split, directly, quickly, without storing the split...

2 Dec at 14:4

Split string at first space

Split string at first space I'm trying to split a string at the first space and only keep the 2nd half. So if the input was "1. top of steel", the output would be "top of steel". I'm working with a fe...

30 Apr at 19:59

JavaScript split String with white space

JavaScript split String with white space I would like to split a String but I would like to keep white space like: How I can proceed to do that? Thanks !

17 Oct at 13:2

Split string, convert ToList<int>() in one line

Split string, convert ToList() in one line I have a string that has numbers I can split it then convert it to `List` How can I convert string array to integer list? So that I'll be able to convert `st...

4 Nov at 03:50

How can I split a string into segments of n characters?

How can I split a string into segments of n characters? As the title says, I've got a string and I want to split into segments of characters. For example: after some magic with `n=3`, it will become I...

19 Sep at 21:30

Python split() without removing the delimiter

Python split() without removing the delimiter This code almost does what I need it to.. Except it removes all the '>' delimiters. So, Turns into

23 Oct at 12:28

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

How can I split and trim a string into parts all on one line? I want to split this line: into an array of their trimmed versions: The following gives me an error "cannot convert type void":

8 Feb at 12:34

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

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 that using Bash? I tried `cut`, but I don't...

2 Nov at 14:17

string split by index / params?

string split by index / params? Just before I write my own function just wanted to check if there exists a function like `string.split(string input, params int[] indexes)` in the .NET library? This fu...

22 Aug at 14:25

Split a string into array in Perl

Split a string into array in Perl Expected output: I want the output to be `file1.gz` in `$abc[0]`, `file2.gz` in `$abc[1]`, and `file3.gz` in `$abc[2]`. How do I split `$line`?

26 Jul at 01:10

C# Regex Split - everything inside square brackets

C# Regex Split - everything inside square brackets I'm currently trying to split a string in C# (latest .NET and Visual Studio 2008), in order to retrieve everything that's inside square brackets and ...

14 May at 17:16

How to convert comma-separated String to List?

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 array, List or Vector)? Or do I need to wri...

16 Jul at 20:35

Splitting a string / number every Nth Character / Number?

Splitting a string / number every Nth Character / Number? I need to split a number into even parts for example: 32427237 needs to become 324 272 37 103092501 needs to become 103 092 501 How does one g...

10 Dec at 11:51

Remove text from string until it reaches a certain character

Remove text from string until it reaches a certain character I'm having a issue trying to figure out this. I need to "fix" some links, here is an example: 1. www.site.com/link/index.php?REMOVETHISHERE...

3 Dec at 23:36

remove last word in label split by \

remove last word in label split by \ Ok i have a string where i want to remove the last word split by \ for example: now i want to remove the last word so that i get a new value for name as is there a...

11 Nov at 15:43

How to extract a string between two delimiters

How to extract a string between two delimiters > [substring between two delimiters](https://stackoverflow.com/questions/10171015/substring-between-two-delimiters) I have a string like > "ABC[ This i...

23 May at 12:34

Split string into tokens and save them in an array

Split string into tokens and save them in an array How to split a string into an tokens and then save them in an array? Specifically, I have a string `"abc/qwe/jkh"`. I want to separate `"/"`, and the...

26 Mar at 17:2

How would I get everything before a : in a string Python

How would I get everything before a : in a string Python I am looking for a way to get all of the letters in a string before a : but I have no idea on where to start. Would I use regex? If so how? Can...

14 Feb at 05:9