split

CSV row split into string array question

Hi ! How would you split this row to a string array? the problem is Rutois, a.s. , so you cannot directly split with ',' separator.. 543472,"36743721","Rutois, a.s.","151","some name","01341",55,"112",1 thanks ...

Split and echo into a list

i have a sql table full of address' like this Hattie:07903 000066::Dad:07854 000095::Tom:07903 000044::Allistair:07765 000005::Home:0115 974 0000:: i would like to split each and every one so that the name and number of each contact is echoed into a seprate panel within a listbox like below <ol> <li>Hattie:07903 000066</li> <li>Dad:0...

Java String Split Problem

I have a string such as 397 Walker Road Wayne, PA 19087 I need to extract the address information (street address, city, state, zip) from it. The problem is, the amount of white space is not consistent in the database. I've split the string on the comma, and extracted the state and zip. But am at a...

javascript split

I can use JavaScript's split to put a comma-separated list of items in an array: var mystring = "a,b,c,d,e"; var myarray = mystring.split(","); What I have in mind is a little more complicated. I have this comma separated string: "mystring_109_all,mystring_110_mine,mystring_125_all" how do i split this string in to an array ...

How can I extract the columns of data with Perl?

I have strings of this kind NAME1 NAME2 DEPTNAME POSITION JONH MILLER ROBERT JIM CS ASST GENERAL MANAGER I want the output to be name1 name2 and position how can i do it using split/regex/trim/etc and without using CPAN modules? ...

javascript split string on multiple fields using regex

I'm trying to build a handy dsl-ish query ability into my javascript. given: var query = "lastName = 'smith' and firstName = 'jack' or city = 'vancouver'"; what's the most elegant way of parsing this sql-esque string into usable objects such as: [ { field:'lastName', operator:'=', value:'smith', join:'and' }, { field:'firstName...

Splitting a WPF PathGeometry into "tiles"

I have a rather large PathGeometry (over 100,000 points and stroked but not filled) to display for the user, but only a small portion of the path will be visible at any one time. To clarify, the path itself is not predetermined but will be created from data. The problem: I want to provide very smooth panning so the user can explore are...

Objective-C Split()?

Hello! Is there any way to split strings in objective c into arrays? I mean like this - input string Yes:0:42:value into an array of (Yes,0,42,value)? Thanks! Christian Stewart ...

Javascript split regex question

hello I am trying what I thought would be a rather easy regex in Javascript but is giving me lots of trouble. I want the ability to split a date via javascript splitting either by a '-','.','/' and ' '. var date = "02-25-2010"; var myregexp2 = new RegExp("-."); dateArray = date.split(myregexp2); What is the correct regex for this an...

PHP get a part of string

How can I check in PHP whether a string contains '-'? Example ABC-cde::abcdef if '-' is found then I have to perform split() to split ABC from cde::abcdef else no need to perform split() like cde::abcdef ...

how do extract decimal number from string in c#

string sentence = "X10 cats, Y20 dogs, 40 fish and 1 programmer."; string[] digits = Regex.Split (sentence, @"\D+"); for this code i get values in digits array like this 10,20,40,1 string sentence = "X10.4 cats, Y20.5 dogs, 40 fish and 1 programmer."; string[] digits = Regex.Split (sentence, @"\D+"); for this code i get values i...

Can this be done without a regular expression?

I've got a string split, using a regular expression. Regex.Split(str, @"\s"); What does this convert to without regex? reason being I'm porting this to PHP and an SQL function. Unless you can show me the PHP code for the same... ...

How to split packets in flash, XMLSocket

Hello I believe my flash client is losing some packets the server sends, because some packets get joined together hence I believe it drops them. Here is my packetHandler in flash private var xmlsock:XMLSocket; this.xmlsock = new XMLSocket(); xmlsock.connect("127.0.0.1", 1234); this.xmlsock.addEventListener(DataEvent.DATA, this....

How to split a string by char 0 / byte 0 / 0x00 / \u0000 in flash

How do I split a string by char 0 / byte 0 / 0x00 / \u0000 in flash actionscript 3 ...

Splitting Address Lines in MS SQL

Hi guys, I have this setup: an output table where my results will end up consisting of [FirstName] [LastName] [Address1] [Address2] [Address3] [ZipCode] [City] [Country] The original data consists mostly of line feed split address lines, some are split by commas, and there is one name field. My original data tables look simply like...

Core Plot and Split Views...Impossible??

This is a general question regarding pulling up a CP plot in a split view controller. I have menu items pointing to individual view controllers pre-loaded with everything core plot related. My question is can anyone fill me in on a good way to present the graphs on the right pane while still showing the left pane? The way that I h...

How do I implement my own escape sequence when using split() in perl?

I'm trying to write a parser for the EDI data format, which is just delimited text but where the delimiters are defined at the top of the file. Essentially it's a bunch of splits() based on values I read at the top of my code. The problem is theres also a custom 'escape character' that indicates that I need to ignore the following delim...

PHP Split Problem

Hello, I am trying to use (and I've tried both) preg_split() and split() and neither of these have worked for me. Here are the attempts and outputs. preg_split("^", "ItemOne^ItemTwo^Item.Three^"); //output - null or false when attempting to implode() it. preg_split("\^", "ItemOne^ItemTwo^Item.Three^"); //output - null or false when att...

how to split <p><span>Hello</span></p> to <span>Hello</span> using javascript

how to split <p><span>Hello</span></p> to <span>Hello</span> using javascript var text = "<p><span>Hello</span></p>"; remember:I don't know what contain <p>, I don't know if <p> has any attribute or not I found the answer ! var patt=/^<p.*?>(.*)<\/p>$/i; var result=patt.exec(text); alert(result[1]); thank's ring0 & w3schools http...

Bash Script to Extract split archive files using rar

Here's what I want to do: I have thousand of split rar archives on folder name Archives. Name of the files 0001.part1.rar 0002.part2.rar 0003.part3.rar etc. read 0001.part1.rar create a directory based on prefix of the file above e.g. 0001 move all files with the same prefix on the directory created above. Extract the files within ...