• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Can't remove extraneous spacing.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Can't remove extraneous spacing.


  • Subject: Re: Can't remove extraneous spacing.
  • From: Eric Stewart <email@hidden>
  • Date: Wed, 28 Sep 2005 09:52:43 -0400

The problem I'm having with just using trim(), which I'm already
using, is that it does not strip non-breaking spaces and it only
strips spaces before the first non-whitespace character and after the
last non-whitespace character. It doesn't however strip extra spaces
between words.

On 9/28/05, Helge Staedtler <email@hidden> wrote:
> why not call trim() on the strings you have?
>
> regards,
> helge
>
>
>
> Am 28.09.2005 3:43 Uhr schrieb "Eric Stewart" unter
> <email@hidden>:
>
> > I've got a web application that is receiving input and I'm having to
> > clean the input before it goes into a database.
> >
> > The problem I'm having is that somehow extra spaces between words are
> > making it into the database.
> >
> > I'm using the following code to remove all extra spaces:
> >
> > value = value.replaceAll("\\s+", " ");
> >
> > But some how input is still making it into the database that is more
> > than 1 space between words.
> >
> > Any thoughts?
> >
> > Eric Stewart
> > email@hidden
> >  _______________________________________________
> > Do not post admin requests to the list. They will be ignored.
> > Webobjects-dev mailing list      (email@hidden)
> > Help/Unsubscribe/Update your Subscription:
> >
> > This email sent to email@hidden
>
>
>
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Can't remove extraneous spacing. (From: Eric Stewart <email@hidden>)
 >AW: Can't remove extraneous spacing. (From: Helge Staedtler <email@hidden>)

  • Prev by Date: Re: Can't remove extraneous spacing.
  • Next by Date: Re: Can't remove extraneous spacing.
  • Previous by thread: AW: Can't remove extraneous spacing.
  • Next by thread: JDBCAppender Logging Solution
  • Index(es):
    • Date
    • Thread