Commons IO
  1. Commons IO
  2. IO-74

Regular expression file name filter implementation

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.4
    • Component/s: Filters
    • Labels:
      None
    • Environment:

      Operating System: other
      Platform: Other

      Description

      I've written a RegexFilter for commons-io. I'd like to share it with other's.
      Hope there'll be a JDK 1.4+ branch soon, so this can be applied.

        Issue Links

          Activity

          Oliver Siegmar created issue -
          Hide
          Oliver Siegmar added a comment -

          Created an attachment (id=17535)
          RegexFilter

          Show
          Oliver Siegmar added a comment - Created an attachment (id=17535) RegexFilter
          Henri Yandell made changes -
          Field Original Value New Value
          issue.field.bugzillaimportkey 38445 12342877
          Henri Yandell made changes -
          Key COM-2725 IO-74
          Affects Version/s unspecified [ 12311647 ]
          Component/s IO [ 12311117 ]
          Project Commons [ 12310458 ] Commons IO [ 12310477 ]
          Assignee Jakarta Commons Developers Mailing List [ commons-dev@jakarta.apache.org ]
          Hide
          Henri Yandell added a comment -

          Consider this in the next release (along with the other regex filter) and accepting a dependency on Java 1.4.

          Show
          Henri Yandell added a comment - Consider this in the next release (along with the other regex filter) and accepting a dependency on Java 1.4.
          Henri Yandell made changes -
          Fix Version/s 1.3 [ 12311946 ]
          Bugzilla Id 38445
          Stephen Colebourne made changes -
          Component/s Filters [ 12311275 ]
          Niall Pemberton made changes -
          Link This issue is duplicated by IO-66 [ IO-66 ]
          Stephen Colebourne made changes -
          Fix Version/s 1.3 [ 12311946 ]
          Fix Version/s 1.4 [ 12312101 ]
          Niall Pemberton made changes -
          Link This issue depends on IO-127 [ IO-127 ]
          Hide
          Niall Pemberton added a comment - - edited

          Thanks for the patch Oliver - I have added this, but also done some refactoring. I removed the facility to specify arrays/lists of regular expression Strings for a number of reasons

          • firstly seemed like a good idea to add constructors that specifying either Pattern flags or case sensitivity (using IOCase), but adding all flavours for flags/case and array/List seemed cumbersome.
          • also the array/list facility only catered for OR conditions which is limiting since users may want AND - Commons IO already contains AndFileFilter / OrFileFilter implementations which can be used with RegexFileFilter to achieve both

          http://svn.apache.org/viewvc/commons/proper/io/trunk/src/java/org/apache/commons/io/filefilter/RegexFileFilter.java?view=log

          Show
          Niall Pemberton added a comment - - edited Thanks for the patch Oliver - I have added this, but also done some refactoring. I removed the facility to specify arrays/lists of regular expression Strings for a number of reasons firstly seemed like a good idea to add constructors that specifying either Pattern flags or case sensitivity (using IOCase), but adding all flavours for flags/case and array/List seemed cumbersome. also the array/list facility only catered for OR conditions which is limiting since users may want AND - Commons IO already contains AndFileFilter / OrFileFilter implementations which can be used with RegexFileFilter to achieve both http://svn.apache.org/viewvc/commons/proper/io/trunk/src/java/org/apache/commons/io/filefilter/RegexFileFilter.java?view=log
          Niall Pemberton made changes -
          Summary [io] A new file filter - RegexFilter Regular expression file name filter implementation
          Assignee Niall Pemberton [ niallp ]
          Niall Pemberton made changes -
          Resolution Fixed [ 1 ]
          Status Open [ 1 ] Resolved [ 5 ]
          Niall Pemberton made changes -
          Link This issue is duplicated by IO-150 [ IO-150 ]
          Henri Yandell made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          Mark Thomas made changes -
          Workflow jira [ 12371782 ] Default workflow, editable Closed status [ 12601851 ]
          Gavin made changes -
          Link This issue depends on IO-127 [ IO-127 ]
          Gavin made changes -
          Link This issue depends upon IO-127 [ IO-127 ]
          Transition Time In Source Status Execution Times Last Executer Last Execution Date
          Open Open Resolved Resolved
          620d 5h 2m 1 Niall Pemberton 13/Oct/07 02:37
          Resolved Resolved Closed Closed
          314d 5h 58m 1 Henri Yandell 22/Aug/08 08:36

            People

            • Assignee:
              Niall Pemberton
              Reporter:
              Oliver Siegmar
            • Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development