From: Ram on
Hi,

Is there a PRX pattern that some one came across for to identify valid
US Drivers License? Thanks!!

~Ram
From: xlr82sas on
On Apr 1, 3:20 pm, Ram <janakiram.madipi...(a)earlywarning.com> wrote:
> Hi,
>
> Is there a PRX pattern that some one came across for to identify valid
> US Drivers License? Thanks!!
>
> ~Ram

Hi,

I lost the link Google perl regular expression drivers license

I think it changes by state

<script language="javascript">
<![CDATA[
form = document.main;
switch ('form.DLSTATE.value'){
case "AL":
case "AK":
case "ME":
case "RI":
//Validate DL for any 7 digits
var alert_text = "Driver's License should contain 7 digits";
var state_name = "Alabama, Alaska, Maine, Rhode Island";
function validate_dl(str_dlnum)
{
var re = /^\d{7}$/;
return re.test(str_dlnum);
}

break;

case "PA":
//Validate DL for any 8 digits
var alert_text = "Driver's License should contain 8 digits";
var state_name = "Pennsylvania";
function validate_dl(str_dlnum)
{
var re = /^\d{8}$/;
return re.test(str_dlnum);
}
break;
</script>
From: Ram on
On Apr 1, 3:41 pm, xlr82sas <xlr82...(a)aol.com> wrote:
> On Apr 1, 3:20 pm, Ram <janakiram.madipi...(a)earlywarning.com> wrote:
>
> > Hi,
>
> > Is there a PRX pattern that some one came across for to identify valid
> > US Drivers License? Thanks!!
>
> > ~Ram
>
> Hi,
>
>   I lost the link Google perl regular expression drivers license
>
>   I think it changes by state
>
> <script language="javascript">
> <![CDATA[
> form = document.main;
> switch ('form.DLSTATE.value'){
> case "AL":
> case "AK":
> case "ME":
> case "RI":
> //Validate DL for any 7 digits
> var alert_text = "Driver's License should contain 7 digits";
> var state_name = "Alabama, Alaska, Maine, Rhode Island";
> function validate_dl(str_dlnum)
> {
>     var re = /^\d{7}$/;
>     return re.test(str_dlnum);
>
> }
>
> break;
>
> case "PA":
> //Validate DL for any 8 digits
> var alert_text = "Driver's License should contain 8 digits";
> var state_name = "Pennsylvania";
> function validate_dl(str_dlnum)
> {
>     var re = /^\d{8}$/;
>     return re.test(str_dlnum);}
>
> break;
> </script>

Thanks xlr....I wish I had similar patterns for rest of the states.