Results 1 to 2 of 2
  1. #1
    Fouad is offline Member
    Join Date
    Jun 2013
    Posts
    6
    Rep Power
    0

    Default split and find the real delimeter

    Hi,


    i have some long string.


    String str=key\\++value;ke\\;y\\+key+value;key\\+key+valu e\\;value;key+value


    first i have to split base on ';' and not base on \\;

    and get the following:

    key\\++value

    ke\\;y\\+key+value

    key\\+key+value\\;value

    key+value


    then i need to split base on + and not base on \\+
    key value

    key\\+ value

    ke\\;y\\+key value

    key\\+key value\\;value

    key value


    please advice how i should do that and which regular expression i need to use or not use but split base on above manner.

    Thanks.
    Last edited by Fouad; 08-28-2013 at 10:37 PM. Reason: correction

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

    Default Re: split and find the real delimeter

    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

Similar Threads

  1. Method to find sum split even point in array
    By uli in forum New To Java
    Replies: 0
    Last Post: 01-31-2013, 07:57 PM
  2. Split a String with split()--Help
    By danilson in forum New To Java
    Replies: 7
    Last Post: 11-19-2010, 05:08 PM
  3. Multi Delimeter String Parsing
    By yuriyl in forum Advanced Java
    Replies: 5
    Last Post: 07-13-2009, 04:34 PM
  4. How to split a String using split function
    By Java Tip in forum java.lang
    Replies: 4
    Last Post: 04-17-2009, 09:27 PM
  5. How to split a String using split function
    By JavaBean in forum Java Tip
    Replies: 0
    Last Post: 10-04-2007, 10:32 PM

Posting Permissions

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