Postal Code Validators
Afternoon watch, 7 bells (3:41 pm)

Well, here’s something I had to refigure out today, hopefully someone else finds Javascript postal code validators as useful as I do:

var usapost=/^[0-9]{5}([ -][0-9]{4})?$/;
var australiapost=/^[0-9]{4}$/;
var canadapost=/^[A-Z][0-9][A-Z][ -][0-9][A-Z][0-9]$/;
var ukpost=/^[A-Z][A-Z0-9]([A-Z0-9])?([A-Z0-9])?[ -][0-9][A-Z]{2}$/;
var germanypost=/^[0-9]{5}$/;

Leave a Comment »
Portable UNIX
Morning watch, 8 bells (8:17 am)

How cool is this? UNIX on the GameBoy Advance. What will they think of next er, what will they hack up next?

Leave a Comment »