https://issues.apache.org/bugzilla/show_bug.cgi?id=48389

           Summary: DateUtil.isADateFormat Replaces Characters Incorrectly
           Product: POI
           Version: unspecified
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: HSSF
        AssignedTo: [email protected]
        ReportedBy: [email protected]


I have an Excel 2003 spreadsheet in which a cell has the custom date format:

yyyy\-mm\-dd\Thh:mm:ss

DateUtil.isaDateFormat trashes this by converting the '\T' to '.'  The problem
is this line of code:

        // And \. into .
        fs = fs.replaceAll("\\\\.",".");

It should be:

        fs = fs.replaceAll("\\\\\\.",".");

The regex parser sees the former as '\\.' which it interprets as backslash
followed by any character.  The regex parser sees the latter as '\\\.' which it
reads as backslash followed by period -- which is what the code wanted to do.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to