http://qs321.pair.com?node_id=1230013

morgon has asked for the wisdom of the Perl Monks concerning the following question:

Hi,

I am thinking about giving a talk about regexes at my local Gophers (i.e. Go-hackers) meetup.

While the talk will mainly be about different regex-engines in Go, I would like to include some introductory material about regexes (what are they, what can I do with them) for which I am at the moment too lazy to create from scratch.

So my question is: Is there any material out there that explains what regexes are in a language-agnostic way that I could use?

And just to assure you: My talk will be a shameless plug about the virtues of the perl-ecosystem by extolling the virtues of using Regexp::Common to generate regexes that go directly into the Go-enine (thanks haukex by the way).

Many thanks!

Replies are listed 'Best First'.
Re: material for a talk about regexes (RegEx References)
by eyepopslikeamosquito (Archbishop) on Feb 17, 2019 at 06:56 UTC
Re: material for a talk about regexes
by davido (Cardinal) on Feb 17, 2019 at 08:25 UTC

    Demonstrate backtracking and alternation, those sorts of things using Regexp::Debugger's rxrx utility.


    Dave

Re: material for a talk about regexes
by AnomalousMonk (Archbishop) on Feb 17, 2019 at 04:09 UTC

    I'm not aware of a regex notation that is "language-agnostic" in a thorough-going way. Maybe the closest would be PCRE, but since that's (supposedly) Perl-compatible by definition, maybe you could just get a pre-Perl-version-5.10 copy of perlretut or perlrequick and base your introductory stuff on that.

    Or else find a shamelessly ripped-off copy of Jeffrey Friedl's Mastering Regular Expressions book on-line somewhere and rip it off even further.


    Give a man a fish:  <%-{-{-{-<

      > Perl-compatible by definition,

      Nomen non est omen!

      (In this case)

      Cheers Rolf
      (addicted to the Perl Programming Language :)
      Wikisyntax for the Monastery FootballPerl is like chess, only without the dice

Re: material for a talk about regexes
by bliako (Monsignor) on Feb 17, 2019 at 11:07 UTC
Re: material for a talk about regexes
by Anonymous Monk on Feb 18, 2019 at 08:20 UTC
    This++ "Or else find a shamelessly ripped-off copy of Jeffrey Friedl's Mastering Regular Expressions book on-line somewhere and rip it off even further. " This is not only a great book (should be compulsory), but the first few chapters do talk about regex engine types as a whole , before going on to lang specific (inc Perl) ones. Cheers Chris