String parsing


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 4 of 4

Thread: String parsing

  1. #1
    Join Date
    Apr 2006
    Posts
    4

    String parsing

    Hi,
    Cud someone pleeez give me a jsp code for seperating each word in a string and storing them in an array and later compare each word in the array with database entries.

  2. #2
    Join Date
    Dec 2004
    Location
    San Bernardino County, California
    Posts
    1,468
    I don't know what "jsp code" you might be referring to, but for java, you might use

    Scanner myScan = new Scanner( yourString );

    this will give you an array of words.

    Then, to read the myScan array,

    while( myScan.hasNext() )
    {
    this.find( myScan.next() );
    }

  3. #3
    Join Date
    Dec 2005
    Posts
    48

  4. #4
    Join Date
    Dec 2004
    Location
    San Bernardino County, California
    Posts
    1,468
    If you are using Java 5, you will like the flexibility and extensive coverage of the Scanner class.

Similar Threads

  1. Input string was not in a correct format
    By mdengler in forum ASP.NET
    Replies: 0
    Last Post: 11-26-2002, 03:32 PM
  2. Replies: 1
    Last Post: 06-05-2001, 07:12 AM
  3. How do I detect an FTP timeout?
    By Julian Milano in forum VB Classic
    Replies: 2
    Last Post: 08-11-2000, 01:11 PM
  4. Please help me -- urgent -- deadlock error
    By chandra in forum VB Classic
    Replies: 0
    Last Post: 06-22-2000, 08:36 AM
  5. Database problems
    By Robert Rieth in forum VB Classic
    Replies: 1
    Last Post: 04-11-2000, 04:21 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center