[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-wget] Regular expression matching

From: Gijs van Tulder
Subject: [Bug-wget] Regular expression matching
Date: Wed, 04 Apr 2012 20:16:34 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:11.0) Gecko/20120329 Thunderbird/11.0.1


Here is a patch that adds the --acceptregex and --rejectregex options.

With these options it would be possible to do two things:

1. You can match complete urls, instead of just the directory prefix or the file name suffix (which you can do with --accept and --include-directories). 2. You can use regular expressions to do the matching, which is sometimes easier to than using a list of wildcard patterns.

Now this isn't a new idea (there are long discussions in the archive, see [1]). But somehow the previous attempts didn't make it, so I thought I'd send my own version. It's a small patch, I've been using it for a while and found it really useful.

I've made two versions of the patch: one uses PCRE, the other uses the gnulib regex library, which is probably easier to integrate.



[1] https://lists.gnu.org/archive/html/bug-wget/2009-09/msg00035.html

Attachment: wget-ere-regex.patch
Description: Text Data

Attachment: wget-pcre-regex.patch
Description: Text Data

reply via email to

[Prev in Thread] Current Thread [Next in Thread]