Re: GNU Awk's types of regular expressions

Liste des GroupesRevenir à cl awk 
Sujet : Re: GNU Awk's types of regular expressions
De : janis_papanagnou+ng (at) *nospam* hotmail.com (Janis Papanagnou)
Groupes : comp.lang.awk
Date : 29. Nov 2024, 09:33:57
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vibu9m$10nck$1@dont-email.me>
References : 1 2
User-Agent : Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0
On 29.11.2024 05:13, Kaz Kylheku wrote:
On 2024-11-28, Janis Papanagnou <janis_papanagnou+ng@hotmail.com> wrote:
[...]
 
And dynamic regexps and first class regexps that got changed (e.g.
by code like
>
  sub(/don't/, "do[", re)
>
in above sample snippet) would both create runtime errors, e.g.
 
Have you tried this?

Yes. (With a response that appeared in my post behind the "e.g." [that
you snipped].)

Do you get an error at sub() time, or when you later try to use re?

It seems to appear with sub(); in the snippet
    ...
    print "PRE"
    sub(/don't/, "do[", re)
    print "POST"
    print typeof(re), re
    ...
"PRE" ist printed but not "POST".

Janis


Date Sujet#  Auteur
28 Nov 24 * GNU Awk's types of regular expressions10Janis Papanagnou
29 Nov 24 +* Re: GNU Awk's types of regular expressions3Kaz Kylheku
29 Nov 24 i+- Re: GNU Awk's types of regular expressions1Janis Papanagnou
30 Nov 24 i`- Re: GNU Awk's types of regular expressions1Janis Papanagnou
1 Dec 24 `* Re: GNU Awk's types of regular expressions6Aharon Robbins
1 Dec 24  `* Re: GNU Awk's types of regular expressions5Janis Papanagnou
2 Dec 24   `* Re: GNU Awk's types of regular expressions4Aharon Robbins
2 Dec 24    `* Re: GNU Awk's types of regular expressions3Janis Papanagnou
2 Dec 24     `* Re: GNU Awk's types of regular expressions2Aharon Robbins
2 Dec 24      `- Re: GNU Awk's types of regular expressions1Janis Papanagnou

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal