RegExLib.com - The first Regular Expression Library on the Web!

Please support RegExLib Sponsors

Sponsors

Expressions by User

   Displaying page 1 of 1 pages; Items 1 to 2
Title Test Details date expression
Expression
^(((((0?[1-9]|[12]\d|3[01])[-/]([0]?[13578]|1[02]))|((0?[1-9]|[12]\d|30)[-/]([0]?[469]|11))|(([01]?\d|2[0-8])[-/]0?2))[-/]((20|19)?\d{2}|\d{1,2}))|(29[-/]0?2[-/]((19)|(20))?([13579][26]|[24680][048])))$
Description
matches dates in the format day/month/year. supports / and - charachters. easily modified to suit your needs. handles leap years.
Matches
1/1/1 01/1/1 11/1/1 1/01/1 1/12/01 1/1/2001 31/1/2001 30/4/1 29/2/00 29/02/2004
Non-Matches
0/1/1 00/5/2001 40/5/2000 31/4/2000 29/2/2001 30/2/2000 1/14/2000 1/0/2000 1/00/2000 1/1/201 1/1/0001
Author Rating: Not yet rated. fake
Title Test Details Exclusion
Expression
(?s)(?i)^(?!^.*(dont match me).*$).*$
Description
will match anything EXCEPT what you replace "dont match me" with. you can replace the last .* with whatever criteria must be matched. example matches anything.
Matches
almost anything at all
Non-Matches
please dont match me; dont match me at all
Author Rating: Not yet rated. fake
   Displaying page 1 of 1 pages; Items 1 to 2

Copyright © 2001-2024, RegexAdvice.com | ASP.NET Tutorials