Avatar of Larry Brister
Larry Brister
Flag for United States of America asked on

Regex for valid date range

Is there a regex that allows a date that is after current date and less than a year in the future?
Microsoft SQL Server 2005.NET ProgrammingVisual Basic.NET

Avatar of undefined
Last Comment
Larry Brister

8/22/2022 - Mon
Nasir Razzaq

That's not a regex's job. That would need to be validated in code. Where and what format is date coming in?
Larry Brister

Theres an input form on a web page

I know I can validate in code behind but this is an older site and everything on this page is validated with RegEx for format etc.

Was just wondering if any type of a Regex or javaScrip would do the trick.
Nasir Razzaq

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
Larry Brister

Your help has saved me hundreds of hours of internet surfing.