Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

existing library for parsing drivers license information?

Tags:

c#

regex

swipe

Is there an existing C# library that can be used to parse the information from a driver's license? I'm looking to parse the data directly from a swipe reader, so its a long string that needs to be broken down into it's components. I know that this is a big request, so I'm not interested in the validation of the numbers or even the license ID itself, I really just want to parse out the first and last name. I'm eventually interested in all 50 states but would like to see AZ and CA first.

like image 598
Unknown Coder Avatar asked Aug 23 '11 18:08

Unknown Coder


2 Answers

I realize this question was asked quite a while ago; but I actually don't agree with @FishBasketGordo that the answer is no; if you read this Wikipedia article you'll see a very clearly specified format that all U.S. driver's licenses (with magnetic stripes) supposedly adhere to, as specified in a standard by the AAMVA.

I personally have done some work on a JavaScript library to do exactly what you're asking (extract name, number, and in my case a few other bits of info) and have had success with the states I've been able to test. Obviously I haven't gotten my hands on licenses from all 50 states, though.

In any case, though I don't know of a library that you can leverage, I still wanted to weigh in on this question and suggest that this should be possible.

like image 162
Dan Tao Avatar answered Sep 22 '22 03:09

Dan Tao


I haven't done an exhaustive search, but I have a little experience with this and I believe the answer is "No". Driver's licence formats vary by state and could potentially change often. However, if you're looking for just the first and last name, that should be fairly easy to figure out by trial and error. Most DL's aren't encrypted from what I've seen. Just setup your card reader through Hyperterminal or something similar and look at the output from you card swipes.

Edit: Please see @Dan Tao's answer as well as the comments for information on driver's license formats. There might even be a C# library for parsing AAMVA compliant license data now (there wasn't in 2011 to my knowledge), which was the original question, which is why I replied "No".

like image 32
FishBasketGordo Avatar answered Sep 24 '22 03:09

FishBasketGordo