Got more questions? Find advice on: ASP | SQL | XML | Windows
Welcome to RegexAdvice Sign in | Join | Help

Match non-numbers in input field

  •  08-26-2008, 3:18 AM

    Match non-numbers in input field

    I have a text input field that I want only to accept numbers or the strings "min" and "max"

    I am using the javascript replace function and have the code (/[^0-9]/gi,"") that will get rid of all characters that aren't numbers, what do I need to add so that it will still keep the strings min and max?  I thought something like ^min would work but it doesn't seem to do anything.

    Regards.

View Complete Thread