ubermotive.com

  • Increase font size
  • Default font size
  • Decrease font size
ubermotive.com

Everybody Stand Back...

E-mail Print PDF

I know Regular Expressions!

So, today I was looking on vplates for a custom car registration. The problem with the system is that custom registration plates never make it back into the pool, despite not actually being assigned to a vehicle. The end result: virtually every dictionary word is taken, so you need to get creative.

The rules are pretty simple:

  • 3 - 6 alphanumeric characters
  • Cannot start with a number

My idea was to find words spelt with symmetrical letters, so I can spell it backwards. This always looks clever when viewed in a rear-view mirror. An 'E' can then be substituted with a '3', as it looks very 'E' like in a mirror. However, as plates cannot start with a number, I therefore can't use a 6-character word that ends with 'E'.

Sounds complex, huh? Not for a regular expression!

egrep -i '^[AEHIMOTUVWXY]{2,5}[AHIMOTUVWXY]{0,1}$' /usr/share/dict/british-english

So now I can casually flick through words that can be mirrored and suit the custom rego guidelines.

Oh, and the end result is here

 

See, I never would have thought of that. It appears nobody else has either.

Last Updated on Tuesday, 06 October 2009 10:15
 

Please stand by...

E-mail Print PDF

This site has recently moved servers. I'll throw some content onto it soon, but it probably won't be the forum, gallery and rants page. Well, maybe a rants page. I'm pretty sure everyone has migrated to Facebook these days for web socialising.

Last Updated on Friday, 18 September 2009 03:24
 

Main Menu