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