"Tony Lewis" <[EMAIL PROTECTED]> writes: > I didn't miss the point at all. I'm trying to make a completely different > one, which is that regular expressions will confuse most users (even if you > tell them that the argument to --filter is a regular expression).
Well, "most users" will probably not use --filter in the first place. Those that do will have to look at the documentation where they'll find that it accepts regexps. Since Wget is hardly the first program to use regexps, I don't see why most users would be confused by that choice. > Yes, regular expressions are used elsewhere on Unix, but not > everywhere. The shell is the most obvious comparison for user input > dealing with expressions that select multiple objects; the shell > uses globs. I don't see a clear line that connects --filter to glob patterns as used by the shell. If anything, the connection is with grep and other commands that provide powerful filtering (awk and Perl's // operators), which all seem to work on regexps. Where the context can be thought of shell-like (as in wget ftp://blah/*), Wget happily obliges by providing shell-compatible patterns. > I don't think ",r" complicates the command that much. Internally, > the only additional work for supporting both globs and regular > expressions is a function that converts a glob into a regexp when > ",r" is not requested. That's a straightforward transformation. ",r" makes it harder to input regexps, which are the whole point of introducing --filter. Besides, having two different syntaxes for the same switch, and for no good reason, is not really acceptable, even if the implementation is straightforward.