• pmk@piefed.ca
    link
    fedilink
    English
    arrow-up
    11
    ·
    16 hours ago

    To make things even more fun, regex differs in subtly different ways, the regex that works in perl might not work in sed. There are two main dialects, BRE and ERE, and lots of tool specific additions. So I find myself wondering if grep is using extended regular expressions, or is that in egrep, or is egrep the standard grep nowadays? One time I saw Russ Cox use Acme, and I saw the real power of regex when used by someone intuitively. But I am no Russ Cox.

    • Randelung@lemmy.world
      link
      fedilink
      English
      arrow-up
      4
      ·
      12 hours ago

      And then you might have to escape every escape character because it needs to go into a string first, making everything even more complex.