Results 1 to 3 of 3
  1. #1
    christina is offline Member
    Join Date
    Jul 2007
    Posts
    39
    Rep Power
    0

    Default how to remove whitespaces in a text

    I want to remove whitespaces in a text to compare the contents to identify some similarity.

    do you have any ideas?

  2. #2
    brianhks is offline Senior Member
    Join Date
    Jul 2007
    Posts
    135
    Rep Power
    0

    Default

    Use String.replaceAll() and pass a regular expression for the first param that specifies all whitespace.

  3. #3
    christina is offline Member
    Join Date
    Jul 2007
    Posts
    39
    Rep Power
    0

Similar Threads

  1. how can we remove blank lines from a .txt
    By Camden in forum New To Java
    Replies: 12
    Last Post: 07-29-2011, 01:38 PM
  2. how to remove an image icon
    By cecily in forum Advanced Java
    Replies: 1
    Last Post: 08-05-2007, 04:25 AM
  3. Is there a way to remove an option from optionsCollection?
    By schu777 in forum JavaServer Pages (JSP) and JSTL
    Replies: 0
    Last Post: 08-02-2007, 09:47 PM
  4. how to remove an object from the array list
    By cecily in forum New To Java
    Replies: 3
    Last Post: 08-02-2007, 02:26 PM
  5. how to remove an old version of JDK
    By tommy in forum New To Java
    Replies: 2
    Last Post: 07-30-2007, 08:59 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
  •