The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
From: Jan Schaumann via TUHS <tuhs@tuhs.org>
To: Alec Muffett <alec.muffett@gmail.com>
Cc: Marc Rochkind <mrochkind@gmail.com>,
	Will Senn <will.senn@gmail.com>, TUHS <tuhs@tuhs.org>
Subject: [TUHS] Re: regex early discussions
Date: Mon, 4 Mar 2024 09:25:00 -0500	[thread overview]
Message-ID: <ZeXZvKH2kc0SdfMQ@netmeister.org> (raw)
In-Reply-To: <CAFWeb9J1esmaLfqKjm0q5YQ09krqHz-11zXaLQDj7w6pHVz2yQ@mail.gmail.com>

Alec Muffett <alec.muffett@gmail.com> wrote:

> I once got into a bunfight with a Googler on the topic of coding interview
> questions, on a related matter. He was promulgating a regular expression to
> correctly match/parse-out legitimate dotted-quad IPv4 addresses

That seems an excellent illustration of "now they have
two problems."  (And now do IPv6.)

If you need to pull IP addresses from text, the most
liberal regex will generally be "good enough"; if you
must be certain, feed the string to inet_aton(3).
:-)

-Jan

  reply	other threads:[~2024-03-04 14:25 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-04  1:30 [TUHS] " Will Senn
2024-03-04  2:03 ` [TUHS] " Marc Rochkind
2024-03-04  3:38   ` Larry McVoy
2024-03-04  4:18     ` Rich Salz
2024-03-04  7:51     ` Alec Muffett
2024-03-04  8:17     ` Rob Pike
2024-03-04  8:43       ` Alec Muffett
2024-03-04 14:25         ` Jan Schaumann via TUHS [this message]
2024-03-04 10:21       ` Bakul Shah via TUHS
2024-03-04 14:34     ` Larry McVoy
2024-03-04  7:10   ` Otto Moerbeek via TUHS
2024-03-04  7:19     ` Dave Long
2024-03-04  7:25       ` arnold
2024-03-04 12:05         ` Ralph Corderoy
2024-03-04 13:01           ` arnold
2024-03-04  7:25     ` Otto Moerbeek via TUHS
2024-03-04 12:00   ` Peter Weinberger (温博格) via TUHS
2024-03-04 17:05   ` Will Senn
2024-03-04 18:43     ` Rich Salz
2024-03-04 20:57       ` Bakul Shah via TUHS
2024-03-04 21:05       ` Steffen Nurpmeso
2024-03-04 13:17 ` Alan D. Salewski
2024-03-04 16:57 ` Clem Cole
2024-03-04 18:38   ` Phil Budne

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZeXZvKH2kc0SdfMQ@netmeister.org \
    --to=tuhs@tuhs.org \
    --cc=alec.muffett@gmail.com \
    --cc=jschauma@netmeister.org \
    --cc=mrochkind@gmail.com \
    --cc=will.senn@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).