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

Re: debian/watch file



"Panagiotes [paggas] Mousikides" <pagx13@yahoo.gr> writes:

> The manpage has this example:
> 
> ftp://ftp.tex.ac.uk/tex-archive/web/c_cpp/cweb/cweb-(.*)\.tar\.gz
> 
> If I got it correct, it means that (.*) will match the version used
> for the orig.tar.gz archive?

Yes. Unfortunately, I just noticed that it will also match *zero*
characters in that position (since the ‘*’ matches zero or more of the
preceding atom). This contradicts the common wisdom to make the regex
as specific as possible.

So, a better example would be:

    ftp://ftp.tex.ac.uk/tex-archive/web/c_cpp/cweb/cweb-(.+)\.tar\.gz

which will match only when there are one or more characters in the
version-string position.

-- 
 \       “The future always arrives too fast, and in the wrong order.” |
  `\                                                    —Alvin Toffler |
_o__)                                                                  |
Ben Finney


Reply to: