Getting substring by regex

Discussion in 'Java' started by Christine Mayer, Sep 6, 2007.

  1. Hi, I got a String that is composed of digits, white space, numbers
    and other characters.
    Example: 03... London (first two digits of post code, plus 3 dots for
    the remaining digits).

    I want to go through the String and search for the first occurrence of
    a letter (A-Za-Z).
    Then I want the String from this point on, excluding the "post code
    String" containing only numbers, whitespace and dots.
    The class String seems to have a "split(regex) function, but this
    didn't work for me.

    Any idea how this could be done?

    Thanks in advance,

    Christine
     
    Christine Mayer, Sep 6, 2007
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Christine Mayer

    Getting substring by regex

    Christine Mayer, Sep 6, 2007, in forum: Java
    Replies:
    5
    Views:
    447
    Roedy Green
    Sep 7, 2007
  2. Christine Mayer

    Getting substring by regex

    Christine Mayer, Sep 6, 2007, in forum: Java
    Replies:
    0
    Views:
    308
    Christine Mayer
    Sep 6, 2007
  3. Replies:
    3
    Views:
    797
    Reedick, Andrew
    Jul 1, 2008
  4. Timur Tabi
    Replies:
    4
    Views:
    954
    Timur Tabi
    Oct 14, 2009
  5. Replies:
    3
    Views:
    214
    Sherm Pendley
    Aug 3, 2005
Loading...

Share This Page