Github user sebastian-nagel commented on a diff in the pull request:

    https://github.com/apache/nutch/pull/89#discussion_r52833909
  
    --- Diff: conf/db-ignore-external-exemptions.txt ---
    @@ -0,0 +1,37 @@
    +# Licensed to the Apache Software Foundation (ASF) under one or more
    +# contributor license agreements.  See the NOTICE file distributed with
    +# this work for additional information regarding copyright ownership.
    +# The ASF licenses this file to You under the Apache License, Version 2.0
    +# (the "License"); you may not use this file except in compliance with
    +# the License.  You may obtain a copy of the License at
    +#
    +#     http://www.apache.org/licenses/LICENSE-2.0
    +#
    +# Unless required by applicable law or agreed to in writing, software
    +# distributed under the License is distributed on an "AS IS" BASIS,
    +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    +# See the License for the specific language governing permissions and
    +# limitations under the License.
    +#
    +#
    +# Exemption rules to db.ignore.external.links
    +#
    +# Format :
    +#--------
    +# UrlRegex1
    +# UrlRegex2
    +# UrlRegex3
    +
    +
    +# NOTE ::
    +# 1. When the url matches any of the regex then that url is exempted.
    +# 2. # in the beginning makes it a comment line
    +# 3. To Test the regex, update this file and use the below command
    +#   bin/nutch plugin urlfilter-ignoreexempt 
org.apache.nutch.urlfilter.ignoreexempt.ExemptionUrlFilter <URL>
    +# 4. Dont forget to enable this plugin in nutch-site.xml
    +
    +
    +# Example 1:
    +#----------
    +# To exempt urls ending with image extensions, uncomment the below line
    +#.*\.(jpg|JPG|png$|PNG|gif|GIF)$
    --- End diff --
    
    Regex could be simplified to `#(?i).*\.(?:jpg|png|gif)` (or 
`#(?i)\.(?:jpg|png|gif)$` if Pattern.find() is used). `(?i)` makes the pattern 
case insensitive, cf. 
[NUTCH-2035](https://issues.apache.org/jira/browse/NUTCH-2035)



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to