Thanks!

> -----Original Message-----
> From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On 
> Behalf Of brian
> Sent: Saturday, January 03, 2009 3:55 PM
> To: jquery-en@googlegroups.com
> Subject: [jQuery] Re: Why would this code not allow a $ as part of the input?
> 
> 
> On Sat, Jan 3, 2009 at 2:28 PM, Rick Faircloth <r...@whitestonemedia.com> 
> wrote:
> >
> > Thanks for the tips, Brian!
> >
> > That gave me just the insight I needed.
> >
> > Here's what I finally ended up with:
> >
> > if ( isNaN (this.value.replace(/\$|,|\./g,'')))
> >
> > That disregards any $ or , or . (commonly used US dollar symbols)
> > to tell me if what is left is a number, which I can parse and
> > store in my database as numeric.
> >
> > I didn't understand the | as "or".
> >
> > Also, what is the g for?
> >
> 
> The g is for 'global', meaning that it will match all occurrences.

Reply via email to