Then I worked on a translation services API doing millions of dollars of business. It was the first book to cover the long-awaited Django 1.0. Built using Django, served with gunicorn and nginx. Here's a nice compact regex for checking that MAC addresses have been entered in the correct format.Now I'm building the core platform of a global startup accelerator. (If you're using this in a double-quoted PHP string, escape the "$" with a backslash.) Some related posts: What happens when you screw up?Thanks to the helpful CB people who assisted me with this: blakem, demerphq, davorg & Petruchio.
There are three common tasks related to storing mac address in the database as char(12) (it is feasible to use bigint instead but in our case we opted for a text type).
However, support for character range collation varies among implementation, so the result may vary.
In theory all mac addresses returned by programs in the wild would follow some standard like 2 hex digits in each separate group.
• From PHP to Python • Racebike building and software engineering • Understanding tuples vs.
lists in Python • The twenty-minute trouble ticket system • Tim Bray: "No New XML Languages" • How to use vim, really • You really should learn regular expressions • Quick, but not dirty, PHP Hi, great regex! It only does not match lower case also the windows output of ipconfig/all (using a dash as delimiter) is not covered here's my addition: /^([0-9a-f A-F][:-])[0-9a-f A-F]$/i Thanks for the update, Bjoern.