in reply to Validating specific numeric input

Just as a note, you probably mean to use rounded brackets instead of square ones in your regex. The square brackets are used for "sets". [\d] is exactly the same as \d, but not (\d).

Secondly, try to escape regex-type characters, such as dash, dot and so forth. /-/ versus /\-/.

Replies are listed 'Best First'.
Re: Re: Validating specific numeric input
by jlongino (Parson) on May 02, 2002 at 18:57 UTC
    Ah, thanks. In my haste to whip something together I mistakenly thought that the square brackets indicated "optional" characters/metacharacters. That would partially explain why the last data example doesn't pass since it requires one or more digits to follow the period.

    --Jim