Question: I am trying to validate a date entered into a text box. There is an input mask on the textbox which forces input of xx/xx/xxxx. I am trying to use a regular expression validator to enforce that a correct date is entered. I am not skilled in RegEx bascially at all. My co-worker found this one on the internet but I can't really tell what it's doing.

Does this look right? Seems overly complicated...

```
(^((((0[1-9])|([1-2][0-9])|(3[0-1]))|([1-9]))\x2F(((0[1-9])|(1[0-2]))|([1-9]))\x2F(([0-9]{2})|(((19)|([2]([0]{1})))([0-9]{2}))))$)

```

Does anyone know of a less complex expression that essentially does what I need?

Answer: 
As an alternative, you can use CompareValidator instead of RegularExpressionValidator. It goes like this: 

`<asp:CompareValidator ID="CompareValidator2" runat="server" ControlToValidate="txtIssueDate" ErrorMessage="Invalid Date Format" Type="Date" Operator="DataTypeCheck" Display="Dynamic" Text="*" ForeColor="Red" ValidationGroup="valGroup1"></asp:CompareValidator>`
This isn't really an answer, but couldn't you use `DateTime.Parse` or [`DateTime.TryParse`](http://msdn.microsoft.com/en-us/library/9h21f14e.aspx) to check that the date is correct? 

Either that or use a `DateTime` control to make sure it's impossible to enter data that isn't a DateTime. There's lots of JavaScript out there on this subject.