Questions tagged [delimited]

221 questions
5
votes
3 answers

Delimited txt file / strings issue

I am trying to do a address alert script for my local volunteer fire brigade and I'm stuck. I have a txt delimited file called preplan.txt containing lines like this: Line1: REF00001 | NAME1 | ALERTADDRESS1 | LINK2DOWNLOADPDFINFOONADDRESS1 |…
AdamK
  • 53
  • 4
5
votes
4 answers

How to extract unique values within each row in dataframe?

I am trying to extract unique values within each rows of dataframe in R without using for loop. df <- data.frame(customer = c('joe','jane','john','mary'), fruit = c('orange, apple, orange', NA, 'apple', 'orange, orange')) df customer …
ybcha204
  • 91
  • 3
5
votes
9 answers

Dynamic SQL Comma-Delimited Value Query

[Update: Using SQL Server 2005] Hi, what I want to do is query my stored procedure with a comma-delimited list of values (ids) to retrieve rows of data. The problem I am receiving is a conversion error: Conversion failed when converting the…
Oliver S
  • 621
  • 2
  • 9
  • 20
5
votes
3 answers

Format 32-character string with hyphens to become UUID

I am receiving a UUID value from an external source, but the string doesn't contain any hyphens. A valid UUID should be in the format: abcdef01-2345-6789-abcd-ef0123456789 How can I convert: $UUID = '42f704ab4ae141c78c185558f9447748'; To: $UUID =…
Vanture
  • 65
  • 5
5
votes
3 answers

T-SQL How to convert comma separated string of numbers to integer

I get the error "Conversion failed when converting the nvarchar value '23,24,3,45,91,' to data type int." The error seems to be occuring on the ON clause. E.ID is an integer field while F.LegalIssue is a varchar field of integers separated by…
David
  • 107
  • 1
  • 1
  • 12
5
votes
10 answers

Split a string AFTER every third instance of character

How can I explode a string at the position after every third semicolon (;)? example data: $string = 'piece1;piece2;piece3;piece4;piece5;piece6;piece7;piece8;'; Desired output: $output[0] = 'piece1;piece2:piece3;' $output[1] =…
stunnaman
  • 911
  • 3
  • 13
  • 19
5
votes
5 answers

Regex to match alphanumeric characters, underscore, periods and dash, allowing dot and dash only in the middle

Presently, I am using this: if (preg_match ('/^[a-zA-Z0-9_]+([a-zA-Z0-9_]*[.-]?[a-zA-Z0-9_]*)*[a-zA-Z0-9_]+$/', $product) ) { return true; } else { return false } For example, I want to…
banskt
  • 416
  • 3
  • 7
  • 17
4
votes
3 answers

chunk_split() corrupts multibyte characters

When I use the chunk_split() function, it ruins my accented characters and special characters. How can I correct this problem? Here is my PHP code. if(count($text) > 0) { $text = implode(' ', $text); echo chunk_split($text, 8, '
');…
HELP
  • 14,237
  • 22
  • 66
  • 100
4
votes
6 answers

Parse inline style attribute string and get index of a specific attribute name

I have the below php array $tempStyleArray which is created by splitting a string. $tempStyleArray = preg_split( "/[:;]+/", "width: 569px; height: 26.456692913px; margin: 0px; border: 2px solid black;" ); Produces: array ( 0 => 'width', 1 => '…
chriz
  • 1,339
  • 2
  • 16
  • 32
3
votes
2 answers

Convert delimited string and value into hierarchical JSON with Python

I have data in the following format: [['Director', 9010], ['Director - Product Manager', 9894], ['Director - Product Manager - Project Manager', 9080], ['Director - Product Manager - Project Manager - Staff', 5090], ['Director - Product Manager -…
dimvrco
  • 33
  • 2
3
votes
2 answers

Group by a multidimensionnal array in PHP and concatenate results with comma (without creating unnecessary commas)

I need to group rows in my two-dimensional array by two columns then within each group, I need to join another column's values with commas. Notice that in the third row, the diagnostic value is empty. $data = [ ["id" => 1, "begin" => "01/01",…
m4gn4n
  • 31
  • 2
3
votes
1 answer

reading in rho delimited file

I'm trying to use Pandas to read in a delimited file. The separator is a greek character, lowercase rho (þ). I'm struggling to define the correct read_table parameters so that the resulting data frame is correctly formatted. Does anyone have any…
3
votes
0 answers

Stata import delimited when newline in data field

I want to import data from a CSV file into Stata. The problem is that sometimes, there is a newline inside a string. Example input CSV: Smith, "John F." Kennedy, "Michael J." How can I import this into Stata?
user1769925
  • 588
  • 1
  • 6
  • 15
3
votes
1 answer

Selecting data from a pipe delimited column

I have a column ClientInformation in a Table CurrentOrders that contains a pipe delimited string: 5275=7147|109=62F36|5075=BCRM|12221=PortwareALGO1 each number= is a FIX tag that I want to name as its own column and need to be able to use in a…
3
votes
1 answer

Transpose list to rows of data

I've data in a file like this: 196465702|91017022|['95592022', '96094942', '100920382']|91048702 and I will be transforming the data as…
user3327034
  • 395
  • 3
  • 13
1
2
3
14 15