This is a language-neutral problem. Here's the story: I've written a substantial php/mysql application for use in my own workplace. It manages the scheduling of court interpreters for court proceedings.
I want to write a second version that avoids all the mistakes I made the first time around (insofar as possible :p), and I want to make it easy to pack up and ship off for installation elsewhere so others can use it too.
One of the tables has a column for the case docket number. Different courts have different formats for their docket numbers. Ours typically look like this: 02CR786 but others' aren't necessarily so. So the question is (sorry for the long intro): how do you approach the problem of validating a string when you don't know what format to validate against? I can imagine a setup/config routine where you ask the user to tell you, but YOW! that sounds complicated.
David Mintz
US District Court, SDNY
http://davidmintz.org/