an annoying form issue, easily solved with a regex

I’ve been booking flights lately. Orbitz has a “remind you” feature that lets you get a voice message, text message or page a few hours before your flight. So I started playing around with it and ran into this:

Orbitz screenshot

A demand that I reformat my phone number to… what? You can then click on the “number and address format example” link to find out what they’re looking for.

Uh. Ok. *click*

And there, before my eyes: a series of about 12 different formats that could easily have been implemented as options in the form.

Orbitz could have said: “So, you’ve got a Verizon form, well that’s great. Give me your phone number and I’ll reformat that into an email address without bothering you!”

Instead, they chose to say, “Hey you – fix that damn phone number. I can’t understand what you’re trying to say with that. I’ll point out to you what you should have known – well, if you’re smart enough to click on the ‘here’s the proper way to do it’ link (not help, really).”

All that crap could have been replaced with a regular expression.