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

Daterange Regex Help needed

  •  05-19-2008, 12:40 AM

    Daterange Regex Help needed

    Hello Everyone.

    I am working on a .NET 3.5 project that needs a regex for date range.  I have tried using Expresso and have searched http://regexlib.com/ but have come up empty handed.

    the regex needs to be able to accept the following input (yyyy - yyyy) AND (yyyy) can can not accept years earlier than 1900 or later than 3000 (needs to cap somewhere)

    here are some examples of some valid entries
    1999 - 2000
    1980 - 1981
    2008

    here are some examples of invalid entries
    1800 - 1801
    asdf
    12345

    Thank you so much for the help.


    Chase

    Visual Studio 2008
    ASP.NET 3.5 (Visual Basic)
    Filed under: , , , ,
View Complete Thread