How to match date mm/dd/yyyy
Given the following input 

    506028500,1820196768,43,0,84552257, ,1,-71.16,42.42,04/26/2012,

I want to filter the date at the end of the row, so I can change its mm/dd/yyyy format into MySQL date format yyyy-mm-dd:


I am trying to match the date at the end of the row having first removed the trailing ',' (comma).

    {
        s/,$//g
        /\([0-9][0-9]\)\/\([0-9][0-9]\)\/\([0-9][0-9][0-9][0-9]\)$/=
    }

I'm getting 12847, but am expecting 04262012. 

What am I doing wrong, that I can't even match the date that's there?

Thanks.
How to match date mm/dd/yyyy
===

Given the following input 

    506028500,1820196768,43,0,84552257, ,1,-71.16,42.42,04/26/2012,

I want to filter the date at the end of the row, so I can change its mm/dd/yyyy format into MySQL date format yyyy-mm-dd:


I am trying to match the date at the end of the row having first removed the trailing ',' (comma).

    {
        s/,$//g
        /\([0-9][0-9]\)\/\([0-9][0-9]\)\/\([0-9][0-9][0-9][0-9]\)$/=
    }

I'm getting 12847, but am expecting 04262012. 

What am I doing wrong, that I can't even match the date that's there?

Thanks.