Forum Discussion
THE_BLUE
Nov 04, 2021Cirrostratus
Parameter Value - Regular Expression
I want to restrict parameter value to accept date only, is below Regular Expression will work?
^([0-2][0-9]|(3)[0-1])(\/)(((0)[0-9])|((1)[0-2]))(\/)\d{4}$
- Erwin_de_BrouwerNimbostratus
Hi, at first glance I would say, yes that will work.
Is there a problem?
Do watch out for the fact you are using the "^" and "$" to mark the begin and end of the input string to search on. They are typically used combined with the multiline-flag (/m)
By the way, I like to use regexr.com when building and testing regex.
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects