Wednesday, April 24, 2013

The best interface is no interface




http://www.cooper.com/journal/2012/08/the-best-interface-is-no-interface.html/

How to validate Canada postal code by regular expression?

^[ABCEGHJKLMNPRSTVXY]\d[A-Z]\d[A-Z]\d$
Code example for ASP.NET webform  RegularExpression validator

<asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ErrorMessage="*" ControlToValidate="TextBoxPostalCode" ValidationExpression="^[ABCEGHJKLMNPRSTVXY]\d[A-Z]\d[A-Z]\d$"></asp:RegularExpressionValidator>

Basic Concept
http://en.wikipedia.org/wiki/Regular_expression
Online Regular Expression tester
http://www.regular-expressions.info/javascriptexample.html