Results 1 to 9 of 9
Like Tree1Likes
  • 1 Post By SurfMan

Thread: spplit function

  1. #1
    sujitha is offline Member
    Join Date
    Dec 2013
    Posts
    1
    Rep Power
    0

    Smile spplit function

    how to split this line 12.34.567 [webcontainer : 90] error dgsdfgdfh_ default c.n.m.exception-login exception
    and i want the line after splitting as
    12.34.567
    [webcontainer : 90]
    error
    dsfdgf
    default
    c.n.m.exception-login exception

  2. #2
    AnandVijay is offline Member
    Join Date
    Oct 2013
    Posts
    15
    Rep Power
    0

    Default Re: spplit function

    post your code...

  3. #3
    SurfMan's Avatar
    SurfMan is offline Godlike
    Join Date
    Nov 2012
    Location
    The Netherlands
    Posts
    1,028
    Rep Power
    4

    Default Re: spplit function

    Here you go: ^(.*?)\s(\[[^]]*\])\s(.*?)\s(.*?)\s(.*?)\s(.*$)
    Now you have two problems. :)
    gimbal2 likes this.
    "It's not fixed until you stop calling the problem weird and you understand what was wrong." - gimbal2 2013

  4. #4
    gimbal2 is offline Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    4,260
    Rep Power
    6

    Default Re: spplit function

    Quote Originally Posted by SurfMan View Post
    Now you have two problems. :)
    I wish I had only two problems!
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

  5. #5
    jim829 is offline Senior Member
    Join Date
    Jan 2013
    Location
    Northern Virginia, United States
    Posts
    3,912
    Rep Power
    5

    Default Re: spplit function

    Three problems. It can't be done because dsfdgf isn't in the string. If the OP made a typo then the other problem is there is no space in dgsdfgdfh_. Unless of course the OP made another typo.

    Regards,
    Jim
    Last edited by jim829; 12-19-2013 at 03:53 PM.
    The JavaTM Tutorials | SSCCE | Java Naming Conventions
    Poor planning on your part does not constitute an emergency on my part

  6. #6
    SurfMan's Avatar
    SurfMan is offline Godlike
    Join Date
    Nov 2012
    Location
    The Netherlands
    Posts
    1,028
    Rep Power
    4

    Default Re: spplit function

    Dammit. "dsfdgf" is not even a substring of "dgsdfgdfh_". Problem cannot be solved.
    "It's not fixed until you stop calling the problem weird and you understand what was wrong." - gimbal2 2013

  7. #7
    gimbal2 is offline Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    4,260
    Rep Power
    6

    Default Re: spplit function

    Wait I have the crystal ball this week, let me have a gander.

    Aha! 'dgsdfgdfh' and 'dsfdgf' both represent 'any text at all'!
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

  8. #8
    jim829 is offline Senior Member
    Join Date
    Jan 2013
    Location
    Northern Virginia, United States
    Posts
    3,912
    Rep Power
    5

    Default Re: spplit function

    It is a very old language from a group of people known as Gibbers.

    Regards,
    Jim
    The JavaTM Tutorials | SSCCE | Java Naming Conventions
    Poor planning on your part does not constitute an emergency on my part

  9. #9
    SurfMan's Avatar
    SurfMan is offline Godlike
    Join Date
    Nov 2012
    Location
    The Netherlands
    Posts
    1,028
    Rep Power
    4

    Default Re: spplit function

    Quote Originally Posted by jim829 View Post
    It is a very old language from a group of people known as Gibbers.

    Regards,
    Jim
    I see what you did there...

    spplit function-scientific_gibberish_poster-r7a135cfc213c497aa1285990dc05bd7a_wad_400-300x300.jpeg
    "It's not fixed until you stop calling the problem weird and you understand what was wrong." - gimbal2 2013

Similar Threads

  1. Recursive function to iteractive function
    By mikeZet in forum New To Java
    Replies: 0
    Last Post: 03-13-2012, 02:42 AM
  2. Calling function in Javascript- from other function
    By jdigger in forum New To Java
    Replies: 1
    Last Post: 02-27-2011, 10:00 PM
  3. this() function
    By sung in forum New To Java
    Replies: 6
    Last Post: 01-23-2011, 04:18 AM
  4. Replies: 3
    Last Post: 12-04-2009, 04:08 PM
  5. Need help with get function
    By calicocal in forum New To Java
    Replies: 10
    Last Post: 11-09-2008, 08:59 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •