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 8 of 8

Thread: How to find a a certain part in string

  1. #1
    Junior Member
    Join Date
    Jul 2011
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default How to find a a certain part in string

    Hi Im new to this site and new to java. I was wondering what method i could use to read input txt file, then only get the emails parts listed in the txt, doc. So that later I can compare it to another list to see if it matches the other list.


  2. #2
    Grand Poobah
    Join Date
    Mar 2011
    Posts
    1,465
    My Mood
    Grumpy
    Thanks
    0
    Thanked 158 Times in 149 Posts

    Default Re: How to find a a certain part in string

    The String class has many method that allow you to find a sequence of chars within the full String, find the location of those chars, to extract those chars etc.
    Improving the world one idiot at a time!

  3. #3
    mmm.. coffee JavaPF's Avatar
    Join Date
    May 2008
    Location
    United Kingdom
    Posts
    3,336
    My Mood
    Mellow
    Thanks
    258
    Thanked 287 Times in 225 Posts
    Blog Entries
    4

    Default Re: How to find a a certain part in string

    For help with reading/writing files, take a look through - File Input/Output Tutorials
    Please use [highlight=Java] code [/highlight] tags when posting your code.
    Forum Tip: Add to peoples reputation by clicking the button on their useful posts.

    Looking for a Java job? Visit - Java Programming Careers

  4. #4
    Junior Member
    Join Date
    Jul 2011
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: How to find a a certain part in string

    There are many ways to find character parts in string. By finding the location of the that character it can be extract from that place. If the number of finding character is one or two it can be fined by the method name accessor method is use. If the number of finding characters are more than the method name substring method is use.

  5. #5
    Forum old-timer
    Join Date
    Nov 2008
    Location
    Faversham, Kent, UK
    Posts
    471
    My Mood
    Mellow
    Thanks
    4
    Thanked 58 Times in 54 Posts

    Default Re: How to find a a certain part in string

    Quote Originally Posted by Haydendiego View Post
    There are many ways to find character parts in string. By finding the location of the that character it can be extract from that place. If the number of finding character is one or two it can be fined by the method name accessor method is use. If the number of finding characters are more than the method name substring method is use.
    WTF is this guy on??

  6. #6
    Grand Poobah
    Join Date
    Mar 2011
    Posts
    1,465
    My Mood
    Grumpy
    Thanks
    0
    Thanked 158 Times in 149 Posts

    Default Re: How to find a a certain part in string

    Quote Originally Posted by dlorde View Post
    WTF is this guy on??
    Why? Do you want some?
    Improving the world one idiot at a time!

  7. #7
    Forum old-timer
    Join Date
    Nov 2008
    Location
    Faversham, Kent, UK
    Posts
    471
    My Mood
    Mellow
    Thanks
    4
    Thanked 58 Times in 54 Posts

    Default Re: How to find a a certain part in string

    Quote Originally Posted by Junky View Post
    Why? Do you want some?
    Meh - not really, I'm confused enough already

    Did you understand that post?

  8. #8
    Grand Poobah
    Join Date
    Mar 2011
    Posts
    1,465
    My Mood
    Grumpy
    Thanks
    0
    Thanked 158 Times in 149 Posts

    Default Re: How to find a a certain part in string

    Quote Originally Posted by dlorde View Post
    Did you understand that post?
    The first sentence, which basically repeats what I said in the first post. Then it does an Alice (disappears down the rabbit hole).
    Improving the world one idiot at a time!

Similar Threads

  1. Replies: 5
    Last Post: April 22nd, 2013, 07:27 AM
  2. A Part Question
    By Aksand in forum Java Theory & Questions
    Replies: 5
    Last Post: April 13th, 2011, 11:12 AM
  3. [SOLVED] Help Again Last Part of my Problem :(
    By metalx66 in forum What's Wrong With My Code?
    Replies: 2
    Last Post: March 19th, 2011, 09:48 PM
  4. Replies: 2
    Last Post: November 3rd, 2009, 05:28 AM
  5. [SOLVED] find the position of the field separator in the String---need help ASAP
    By rajesh.mv in forum Java Theory & Questions
    Replies: 6
    Last Post: August 17th, 2009, 10:33 AM