Search Result

Collapse
12 results in 0.0050 seconds.
Keywords
Members
Tags
split
  •  

  • david2031
    started a topic the str.split(sep,maxsplit) function

    the str.split(sep,maxsplit) function

    given:
    my = 'my name is david'

    i would like to make this into a list with 2 values
    i would like the list to be:
    mylist = ['my name is','david']

    so i try using:
    mylist = my.split(' ',1)

    but i soon find it splits left to right which returns:
    mylist = ['my','name is david']

    to avoid having to use alot of other code, i am wondering if there is a way to make it split right...
    See more | Go to post

  • neeru29
    started a topic Split a line by whilespace or tabcharacter (\t)
    in C

    Split a line by whilespace or tabcharacter (\t)

    Hi,

    I have file in while following line are present

    dir1 dir2 dir3 dir2 file1 file2
    dir1_file1 dir1_file2\tdir 2_file1 dir2_file2\tdir 3_file1
    ...
    ...

    reading a one line at a time from a file,

    i'm using the function strtok_r() to split the each line with delimiter whilespace and '\t' character.

    How can differentiate that 2 words are split by whitespace or...
    See more | Go to post

  • DYPH
    started a topic how do i split a joining multiple file

    how do i split a joining multiple file

    i've a problem to split a join multiple file.
    here's my code to join a multiple file.
    Code:
    import sys
    import os
    
    f = open("e:/Dev/1.jpg", "rb")
    g = open("e:/Dev/2.mp3", "rb")
    dataList = []
    dataList.append(f.read())
    dataList.append(g.read())
    g.close()
    
    data = f.read()
    new = f.name
    f = open(new, 'wb')
    for data in dataList:
    ...
    See more | Go to post

  • Crystal Reports Xi:Result of split function Display in multiple rows

    Hello,
    I am working on Crystal reports Xi.I am creating one formula using split function.I have to display the result in multiple rows.Example:
    If address has Multiple Lines split it based on Space(any delimiter)then display in differrent rows for particular row.
    Like that i have container Numbers concatenated with &.I have to display them in multiple rows one by one on record basis.
    Here is my code:
    ...
    See more | Go to post

  • bdmir
    started a topic How to create report out of raw text file?

    How to create report out of raw text file?

    Hello,
    I have a text file(tab delim) with data and I want to create report. Here is the content of text file:

    HD John Smith j.smith@testmai l.com
    CT service 1 5$
    CT service2 1 6$
    CT service3 4 7$
    FT total 6 18$
    HD Cindy Surname c.surname@testm ail.com
    CT ... ... and etc.

    HD- is report header, CT-report content(invoice items), FT-footer.

    Now I'm splitting...
    See more | Go to post

  • How to display part of a line in a .txt file?

    Hello,

    I'm need of some help again.
    I've got a Folder, in which there is a File.
    In the File, there are two lines, and the data in the lines is seperated with a " // ".

    Example:
    There is a folder at location @"C:\ExampleFol der_ABCD\"
    In the folder there is a file @"C:\ExampleFol der_ABCD\Exampl eFile_ABCD.txt"
    In the file there are two lines:
    Name_1
    ...
    See more | Go to post

  • How do I split a text file without stripping the character I'm splitting at?

    Hi everyone, I'm new to python and would like to split a FASTA (text) file into each different gene (separated by a ">"), randomly sample a certain number of the sequences, and print the result. I have the program almost working correctly, but for some reason text.split('>') strips all of the ">"s from the file. If there's some way I can either remove this strip or add back in the ">" character that would...
    See more | Go to post
    Last edited by bvdet; Nov 5 '10, 06:01 PM. Reason: Add code tags

  • JeremyI
    started a topic Appalling performance after splitting database

    Appalling performance after splitting database

    Hi all, working in Access 2003 (using the Access 2000 file format).

    I've been developing a moderate-sized database and have recently secured write permission for the network folder that is to be its permanent home. So after moving it there, I went to split the front and back ends so that I could test the links, distribute the front end, and begin training the administrators.

    But it hasn't gone well.

    Previously,...
    See more | Go to post

  • problem with "|" character while splitting text or string.

    hi everybody,
    I am having problem with "|" character while splitting text or string. but all other characters are working like (/ ; , - _).

    Does "|" has a special property or does it related about its ASCII code?

    my code is;

    String delimeter="0";
    int k = 0;
    String[] list;
    String line = buf.readLine();
    while...
    See more | Go to post

  • PERL script that prints out the file names and file sizes and determines the average

    Hello,

    I was wondering if anyone might be able to help me with a little PERL script? I'm very new and I have been given a task to write a simple Perl script that prints out the file names and file sizes and determines the average file size from the directory listing found in the "files.txt" file. In other words, I need to add up the size of all of the files listed in the text document and divide by the number of files listed....
    See more | Go to post

  • pascalito
    started a topic Preg_split question
    in PHP

    Preg_split question

    Hi,

    i have a problem with a regular expression.

    i want to split a string on character pipe | with preg_split php function.

    The string is :

    "foo|bar|'hello |world\'abc\'de f'|bye"

    Result of split must be in an array :

    foo
    bar
    hello|world'abc 'def
    bye


    Anyone have an idea ?
    Thank you !!
    bye
    See more | Go to post
    Last edited by pascalito; Oct 6 '09, 02:11 PM. Reason: adding preg_split function

  • dafydd
    started a topic splitting a file by a character
    in Perl

    splitting a file by a character

    I got a multiline SQL file that I would like to split by ; and read into an array. However when I try to do
    Code:
    my @array = split(";", <FH>);
    and iterate over each element I get just the first line of the SQL file.

    Does anyone know how they would get the array of sql statements (and no new lines)?
    See more | Go to post
    Last edited by numberwhun; May 13 '09, 07:19 PM. Reason: Please use code tags!
Working...