Questions tagged as 'split'

2
answers

Perform a comma split taking into account if there are quotes

I have the following lines in java: 1234,"Calle Jaime III, 34", 67,3,U 1235,Avenida Los Algodones, 12,1,L 1236,"Calle Principal""31234", 46,3,H 1237,"Calle Alfonso X,22", 65,2,J I would like to do a Split for the character   , but...
asked by 23.05.2017 / 18:15
1
answer

Unexpected result using string.split ()

Given the following code: function myFunction() { var str = "<tr><td>Prueba 1</td><td>Prueba 1</td><td>Prueba 1</td>td>Prueba 1</td><td>Prueba 1</td><td>Pru...
asked by 20.08.2017 / 22:11
2
answers

Split in Java, how to detect that there is no separator

I am separating a word in Java whose separator is a -, my problem comes in that sometimes it does not have - to separate and therefore it gives me an error, as I could previously detect that the separator does not exist. An example to be underst...
asked by 29.04.2018 / 00:46
2
answers

Extract integers from a JAVA string

I have this string ( LIXA ABIMERHI JUAN JOSE,DISEÑO DE INTERFACES,90,88,81,90 ) and they are asking me: Read the data by lines using the split method of the class String separate the fields. Convert the 4 strings of gra...
asked by 24.11.2017 / 15:21
2
answers

Java Split excluding rank

I receive a String in java with a value format and range [x,y,z] so that the input String is valor[x,y,z] (example 20[4Y,2W,4H] ). I can have values with a condition or (represented with a ',') so that the...
asked by 13.02.2018 / 12:47
1
answer

Save parts of a String in different variables using regular expressions and java split function

I have a problem with these regular expressions. Based on the following code and knowing that the content of wemcamDetails is: USB\VID_04F2&PID_B2E1&MI_00&9F9657C&0&1200 : Lenovo EasyCamera Code: String...
asked by 08.02.2017 / 19:48
2
answers

How do I separate a line of text and store it in a vector in Java?

I have a text file, which is read and stored in a variable linea , then I separate the content of the line with linea.split(); . How do I make the content stored in a vector, being already separated? For example: 4 1 H 6 O 3...
asked by 09.09.2016 / 17:05
1
answer

Add characters to a string in sql

I have a very simple string like the following    'kyo, 1, koko, yuyu' then I would like to add single quotes to each word to get something like    '' kyo ',' 1 ',' koko ',' yuyu '' Even if possible I would like to respect the whol...
asked by 13.09.2018 / 01:47
3
answers

Constructor using String

I have to make a constructor in the class CancionImpl that receives a string with the values of the properties separated by semicolons (;), in the following order: type id String , artist type Artist, duration in seconds, type name...
asked by 29.05.2018 / 17:37
2
answers

split Javascript separator

I have to write a function in which I pass a complete name (string) and return the abbreviated name (the name and first letter of the first surname, followed by a period) - > that is, I type Pepito Perez and Pepito P has to return me. I am...
asked by 24.10.2018 / 13:32