...
>     filenames have the form <PKG>-<VER>-<REV>.<EXT>
>     e.g.:                   ab-cd-1.23a-45678.tar.gz
>     Field Separators:            -     -     .
>     Field Contents:         ab-cd 1.23a 45678 tar.gz
...
>  -  Counting to the right from that point, the first '.' encountered
>     separates REV from EXT.  Whitespace to the right of EXT delimits it.
>  -  Counting to the left from that point, the first '-' encountered
>     separates PKG from VER  Whitespace to the left of PKG delimits it.

FWIW, _all_ RedHat (i386) packages conform to the regular expression

        sed "/^${PKG}-[^-]*-[^-]*\.i386\.rpm$/p"`
                 PKG - VER - REV . EXT

Reply via email to