Questions tagged [split-function]
21 questions
3
votes
5 answers
Split a String using split function to count number of "that"
String str = "ABthatCDthatBHthatIOthatoo";
System.out.println(str.split("that").length-1);
From this I got 4. that is right but if last that doesn't have any letter after it then it shows wrong answer '3' as in :
String str =…

Khushboo Chaudhary
- 95
- 1
- 13
3
votes
3 answers
Loop through cells and add values into an array then display into activecell in VBA
I've been struggling with this for a while and i need help. I am new to vba and would appreciate some guidance on the issue. My spreadsheet is set up so i am in cell a2 and am reading the value in b2 which is an integer that tells me how many…

chepito77
- 33
- 1
- 4
3
votes
6 answers
SQL: break up one row into many (normalization)
I am in middle of upgrading from a poorly designed legacy database to a new database. In the old database there is tableA with fields Id and Commodities. Id is the primary key and contains an int and Commodities contains a comma delimited…

dmr
- 21,811
- 37
- 100
- 138
2
votes
1 answer
Unexpected Behavior From JavaScript Split function (Chrome/Firefox)
I add a string (i.e. 'Bob Smith') from a jQuery click event trapped using the on function . . .
$(".vendorLookup").on("click", { fullName: $(this).text() }, displayAddy);
In the displayAddy handler for the click event, I extract the string (a…

Toadmyster
- 490
- 3
- 10
2
votes
2 answers
How To Split Pipe-Delimited Column and insert each value into new table Once?
I have an old database with a gazillion records (more or less) that have a single tags column (with tags being pipe-delimited) that looks like so:
Breakfast
Breakfast|Brunch|Buffet|Burger|Cakes|Crepes|Deli|Dessert|Dim Sum|Fast Food|Fine…

Moak
- 12,596
- 27
- 111
- 166
2
votes
2 answers
SQL Server: split record
I have a table like this:
account | check1 | check2
1 | 100]200]300 | 101]209]305
2 | 401]502 | 404]511
3 | 600 | 601
I want to separate the records into something like…

user1438730
- 31
- 4
1
vote
1 answer
Getting error in split function inside array formula when using it with column title(array literal)
I am using these functions in my google sheets. With an array literal, I am getting an error when there are comma-separated inputs which need to be split but its working fine when there is only value in the K column. It's working fine without column…

swapnilindahood
- 107
- 2
- 9
1
vote
3 answers
SQL Server 2005 seperate stored procedure CSV value into multiple columns?
I'm a SQL Server 2005 newb and I have to do something that should be easy but I'm having difficulties.
For the time being my stored procedure is storing csv in one column in my db. I need to break apart the csv into multiple columns. The number of…

chris
- 11
- 1
1
vote
1 answer
How Do I get this Split Function to Work? (VB.NET)
So, I made a program that for the most part, converts numbers to letters. My problem before was it was converting each individual digit instead of each number e.g. (1-0-1 instead of 101). Someone suggested that I use the Split function:
Dim…

Bit Deception
- 297
- 1
- 3
- 7
0
votes
3 answers
If all the values are in one file, how do you split them into different lists?
How would I write a python code for this using split function?
Example of input file (.txt) :
3
Day 1
Option A, 30
Option B, 60
Option C, 90
Day 2
Option A, 16
Option B, 24
Option C, 30
Day 3
Option A, 64
Option B, 49
Option C, 39
This should be…
user20410410
0
votes
1 answer
what happens when we specify column name in split function in R?
What is the difference between these two lines of codes in R?
split = sample.split(dataset$Customer_Segment, SplitRatio = 0.8)
split = sample.split(dataset, SplitRatio = 0.8)

Ghalebani
- 3
- 1
0
votes
3 answers
python split and remove duplicates
I have the following output with print var:
test.qa.home-page.website.com-3412-jan
test.qa.home-page.website.net-5132-mar
test.qa.home-page.website.com-8422-aug
test.qa.home-page.website.net-9111-jan
I'm trying to find the correct split function to…

KC14
- 47
- 3
0
votes
0 answers
Last value of String array
import java.util.*;
public class s22 {
public static void main(String[] args) {
//Your Code Here
Scanner sb=new Scanner(System.in);
int n=sb.nextInt();
int i,j;
String[] st=new String[1000];
…

TEN
- 1
- 1
0
votes
2 answers
Splitting String in two parts in Python
I have a column with the values like these
EUR, London , Germany
USD , New York , Boston, Canada
INR , Delhi, Mumbai
I am trying to extract the portion after the first ',' into another column, something like this
Desired output:
London ,…

Pooja Gangurde
- 103
- 5
0
votes
2 answers
split file by only lines sep containing "|"
I have a huge file structured :
>ABC_123|XX|YY|ID
CNHGYDGHA
>BBC_153|XX|YY|ID
ACGFDRER
I need to split this file by based on first value on line
File1: ABC_123 -> should contain
>ABC_123|XX|YY|ID
CNHGYDGHA
File2: BBC_153 ->…

bio-code's
- 1
- 2