Results 1 to 2 of 2
  1. #1
    Ben1 is offline Member
    Join Date
    Oct 2010
    Posts
    16
    Rep Power
    0

    Default Split string help

    Hi everyone,

    I think I need to use the split string function in Java but if there's a better way then I'm happy to change :-)

    I'll start my pasting a packet that I've captured and work from there:


    ______________________
    SDG 0 373
    Routing: 1.0
    To: 1:emailaddress1@hotmail.com
    From: 1:emailaddress2@live.co.uk;epid={27dd8fb5-c46b-41c6-85dc-916069a526f7}
    Service-Channel: IM/Online

    Reliability: 1.0

    Messaging: 2.0
    Message-Type: Text
    Content-Transfer-Encoding: 7bit
    Content-Type: text/plain; charset=UTF-8
    Content-Length: 14
    X-MMS-IM-Format: FN=Segoe%20UI; EF=; CO=0; CS=1; PF=0

    testing packet
    ______________________

    I'm trying to store email addresses (emailaddress1 & emailaddress2) to variables, but I'm not really sure where to start.

    Can anyone shed any light on it?

    Thanks,
    Greatly appreciated.

    Ben

  2. #2
    KevinWorkman's Avatar
    KevinWorkman is offline Crazy Cat Lady
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    4,017
    Rep Power
    10

    Default

    Look into regular expressions and the Pattern class. Google is your friend.

Similar Threads

  1. Using String Split
    By JonJacobs in forum New To Java
    Replies: 5
    Last Post: 07-27-2010, 08:43 PM
  2. String Split
    By sarovarc in forum New To Java
    Replies: 6
    Last Post: 04-19-2010, 06:06 AM
  3. string split
    By gisler in forum New To Java
    Replies: 6
    Last Post: 12-17-2009, 03:23 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
  •