bug-wget
[Top][All Lists]
Advanced

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

Re: [Bug-wget] Re: Thoughts on regex support


From: Micah Cowan
Subject: Re: [Bug-wget] Re: Thoughts on regex support
Date: Fri, 25 Sep 2009 11:11:18 -0700
User-agent: Thunderbird 2.0.0.23 (X11/20090817)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Matthew Woehlke wrote:
> Micah Cowan wrote:
>> Tony Lewis wrote:
>>>> If the components aren't specified, it would default to matching just
>>>> the pathname portion of the URL.
>>> I'm not sure this is the obvious behavior, but I would get used to it.
>>
>> It's open for discussion. What do you think the most obvious behavior
>> would be? Full-url? I'm currently trying to aim for
>> most-frequently-used, over most-obvious, so if you think that'd be a
>> different component (or slice of components), lemme know.
> 
> I'd missed this point in the original message. I would think full url is
> most obvious. I'd be hesitant to guess what 'most used' would be; that
> tends to be a failing proposition for at least some audiences. Ergo
> since no solution is best from 'most used' standpoint, 'most sensible'
> wins out IMHO.
> 
> (And I personally think url is more obvious than ':s-p:'...)

I'm not so sure. I think a lot of people who did --match '\.html$' would
be miffed when they discover that the match fails on
"index.html?foo=bar". It depends somewhat on the site, but I think in
general :s-p: will be less surprising than :url:.

BTW, I'm starting to think "-" was a poor choice... it'd be nice to
reserve that for possible use in component names. Maybe :s..p: is the
best way to go after all.

(mine:)
>> As already discussed, --match and --no-match would be analogs to -A and
>> - -R; they'd just use regexes rather than wildcards (and have wider
>> options for what portions you're matching against).
> 
> Thought: is it possible to alter the syntax of -A/-R to tell these that
> you are matching a regex rather than a glob? Maybe by requiring the '::'?

I'm not crazy about that. It would save us the consumption of new
short-options, but...

I'm not sure I can identify what my objection is; obviously it'd break
any previous scripts that happen to match that pattern, but that has
gotta be pretty frikkin' rare.

- --
Micah J. Cowan
Programmer, musician, typesetting enthusiast, gamer.
Maintainer of GNU Wget and GNU Teseq
http://micah.cowan.name/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkq9B8YACgkQ7M8hyUobTrEGdgCfdXY8kAhVkFCunPv652YjXcrs
slcAn0Q0/40h1hqK9yW8mZVqwBXVSrmR
=xUoI
-----END PGP SIGNATURE-----




reply via email to

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