commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Darren Hartford" <dhartf...@ghsinc.com>
Subject [commons-net] UnixFTPEntryParser - patch/change
Date Tue, 23 Sep 2008 21:03:46 GMT
Would like a change to the UnixFTPEntryParser to better handle the scenario below

Usecase:
drwxr-xr-x345 55555      5555555555          55555 Sep 22 23:22 MYBUSYDIR


The hardLinks is directly beside the permission block, there is no space (-x560).

old UnixFTPEntryParser (NET_2_0 tag):
=======
    private static final String REGEX =
        "([bcdelfmpSs-])"
        +"(((r|-)(w|-)([xsStTL-]))((r|-)(w|-)([xsStTL-]))((r|-)(w|-)([xsStTL-])))\\+?\\s+"
        + "(\\d+)\\s+"
...
========


Recommended Change
=======
//change last \\s space from group 2/14 from \\s+ to \\s*, from 'one to many' to 'zero to
many'
    private static final String REGEX =
        "([bcdelfmpSs-])"
        +"(((r|-)(w|-)([xsStTL-]))((r|-)(w|-)([xsStTL-]))((r|-)(w|-)([xsStTL-])))\\+?\\s*"

        + "(\\d+)\\s+"
...
=======

Thanky, looking forward to a new commons net release soon!

-D



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Mime
View raw message