Re: Useless Use Of Regexes

Liste des GroupesRevenir à col misc 
Sujet : Re: Useless Use Of Regexes
De : ldo (at) *nospam* nz.invalid (Lawrence D'Oliveiro)
Groupes : comp.os.linux.misc
Date : 27. Mar 2025, 22:05:46
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vs4eja$14bph$1@dont-email.me>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13
User-Agent : Pan/0.162 (Pokrosvk)
On Thu, 27 Mar 2025 16:51:16 +0100, Marc Haber wrote:

Lawrence D'Oliveiro <ldo@nz.invalid> wrote:
>
On Thu, 27 Mar 2025 07:58:32 +0100, Marc Haber wrote:
>
You could have it easier with getopt ...
>
Last I checked, getopt doesn’t do long options.
 
You should check again.

ldo@theon:~> help getopt
getopts: getopts optstring name [arg ...]
    Parse option arguments.
   
    Getopts is used by shell procedures to parse positional parameters
    as options.
   
    OPTSTRING contains the option letters to be recognized; if a letter
    is followed by a colon, the option is expected to have an argument,
    which should be separated from it by white space.
   
    Each time it is invoked, getopts will place the next option in the
    shell variable $name, initializing name if it does not exist, and
    the index of the next argument to be processed into the shell
    variable OPTIND.  OPTIND is initialized to 1 each time the shell or
    a shell script is invoked.  When an option requires an argument,
    getopts places that argument into the shell variable OPTARG.
   
    getopts reports errors in one of two ways.  If the first character
    of OPTSTRING is a colon, getopts uses silent error reporting.  In
    this mode, no error messages are printed.  If an invalid option is
    seen, getopts places the option character found into OPTARG.  If a
    required argument is not found, getopts places a ':' into NAME and
    sets OPTARG to the option character found.  If getopts is not in
    silent mode, and an invalid option is seen, getopts places '?' into
    NAME and unsets OPTARG.  If a required argument is not found, a '?'
    is placed in NAME, OPTARG is unset, and a diagnostic message is
    printed.
   
    If the shell variable OPTERR has the value 0, getopts disables the
    printing of error messages, even if the first character of
    OPTSTRING is not a colon.  OPTERR has the value 1 by default.
   
    Getopts normally parses the positional parameters, but if arguments
    are supplied as ARG values, they are parsed instead.
   
    Exit Status:
    Returns success if an option is found; fails if the end of options is
    encountered or an error occurs.

Date Sujet#  Auteur
24 Mar 25 * Useless Use Of Regexes41Lawrence D'Oliveiro
24 Mar 25 +* Re: Useless Use Of Regexes29Pancho
24 Mar 25 i+- Re: Useless Use Of Regexes1The Natural Philosopher
24 Mar 25 i+* Re: Useless Use Of Regexes26Lawrence D'Oliveiro
25 Mar 25 ii+* Re: Useless Use Of Regexes3Marc Haber
26 Mar 25 iii`* Re: Useless Use Of Regexes2Lawrence D'Oliveiro
26 Mar 25 iii `- Re: Useless Use Of Regexes1Marc Haber
25 Mar 25 ii+* Re: Useless Use Of Regexes21Anssi Saari
25 Mar 25 iii`* Re: Useless Use Of Regexes20Marc Haber
26 Mar 25 iii +* Re: Useless Use Of Regexes16Lawrence D'Oliveiro
26 Mar 25 iii i`* Re: Useless Use Of Regexes15Marc Haber
26 Mar 25 iii i `* Re: Useless Use Of Regexes14Lawrence D'Oliveiro
26 Mar 25 iii i  +* Re: Useless Use Of Regexes12Marc Haber
27 Mar 25 iii i  i`* Re: Useless Use Of Regexes11Lawrence D'Oliveiro
27 Mar 25 iii i  i `* Re: Useless Use Of Regexes10Marc Haber
27 Mar 25 iii i  i  `* Re: Useless Use Of Regexes9Lawrence D'Oliveiro
27 Mar 25 iii i  i   `* Re: Useless Use Of Regexes8Marc Haber
27 Mar 25 iii i  i    `* Re: Useless Use Of Regexes7Lawrence D'Oliveiro
28 Mar 25 iii i  i     +* Re: Useless Use Of Regexes5marrgol
28 Mar 25 iii i  i     i+* Re: Useless Use Of Regexes3Chris Ahlstrom
28 Mar 25 iii i  i     ii`* Re: Useless Use Of Regexes2rbowman
29 Mar 25 iii i  i     ii `- Re: Useless Use Of Regexes1Chris Ahlstrom
28 Mar 25 iii i  i     i`- Re: Useless Use Of Regexes1Lawrence D'Oliveiro
1 Apr 25 iii i  i     `- Re: Useless Use Of Regexes1Wayne
27 Mar 25 iii i  `- Re: Useless Use Of Regexes1c186282
26 Mar 25 iii `* Re: Useless Use Of Regexes3c186282
26 Mar 25 iii  `* Re: Useless Use Of Regexes2rbowman
27 Mar 25 iii   `- Re: Useless Use Of Regexes1c186282
25 Mar 25 ii`- Re: Useless Use Of Regexes1Pancho
30 Mar 25 i`- Re: Useless Use Of Regexes1Stéphane CARPENTIER
25 Mar 25 +- Re: Useless Use Of Regexes1Ben Collver
30 Mar 25 `* Re: Useless Use Of Regexes10Stéphane CARPENTIER
30 Mar 25  `* Re: Useless Use Of Regexes9Lawrence D'Oliveiro
30 Mar 25   `* Re: Useless Use Of Regexes8Stéphane CARPENTIER
31 Mar 25    `* Re: Useless Use Of Regexes7Lawrence D'Oliveiro
6 Apr09:40     `* Re: Useless Use Of Regexes6Stéphane CARPENTIER
7 Apr22:39      `* Re: Useless Use Of Regexes5Lawrence D'Oliveiro
8 Apr02:00       +- Re: Useless Use Of Regexes1c186282
8 Apr03:05       `* Re: Useless Use Of Regexes3Eli the Bearded
8 Apr03:06        +- Re: Useless Use Of Regexes1c186282
8 Apr06:49        `- Re: Useless Use Of Regexes1Lawrence D'Oliveiro

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal