Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: regex help

  1. #1
    Junior Member
    Join Date
    Dec 2012
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default regex help

    i wanted to extract string lists from large string without using many loops .can you please help me how to extract below string lists from provided string using regex.


    input:
    timezone=america/boston&firmwareversion=1.0&clientversion=1&LLID=45 557&id=2345656677&interfaceDeviceinfo=123456777888 &timezone=america/boston&firmwareversion=1.0&clientversion=1&LLID=45 557&id=2345656677&interfaceDeviceinfo=123456777888 &timezone=america/boston&firmwareversion=1.0&clientversion=1&LLID=45 557&id=2345656677&interfaceDeviceinfo=123456777888

    ouput:
    timezone stringlist
    firmwareversion stringlist
    clientversion stringlist
    LLID stringlist
    id stringlist
    interfaceDeviceinfo stringlist


  2. #2
    Super Moderator curmudgeon's Avatar
    Join Date
    Aug 2012
    Posts
    1,130
    My Mood
    Cynical
    Thanks
    64
    Thanked 140 Times in 135 Posts

    Default Re: regex help

    First ask yourself what patterns exist that you can use to help you extract the information. If there are no regular patterns, then regular expressions will not help you. Next you'll want to specify what you mean exactly by "stringlist". Next show us what you've tried or tell us what you'd like to try but you may be confused on.

Similar Threads

  1. Need some Regex help, please.
    By Josheh in forum Java SE APIs
    Replies: 1
    Last Post: December 15th, 2011, 09:43 PM
  2. help with regex
    By fate0x1 in forum Java SE APIs
    Replies: 1
    Last Post: November 18th, 2011, 04:44 PM
  3. need help with regex
    By o2a1 in forum What's Wrong With My Code?
    Replies: 4
    Last Post: February 13th, 2011, 08:50 AM
  4. Need help with Regex
    By snytkine in forum Java Theory & Questions
    Replies: 4
    Last Post: October 12th, 2010, 07:30 AM
  5. Need help with regEx
    By ptabatt in forum What's Wrong With My Code?
    Replies: 4
    Last Post: August 14th, 2010, 11:17 AM