the original said reggae but i misread it as regex and got this idea lol

original comic artist: thisstupidtwink@insta

  • Voroxpete@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    4
    ·
    4 days ago

    from the /g at the end (and the spaces on the edges) i agree it looks like a malformed attempt at an awk/perl/etc substitution

    The /g at the end is the global operater. It means, roughly, match across the entire input string.

    This is completely valid regex, not a malformed attempt at anything. It’s just that the delimiters and operators are often omitted from regex in practical use so you may not be used to seeing them.

    • Arthur Besse@lemmy.ml
      link
      fedilink
      English
      arrow-up
      3
      ·
      4 days ago

      yeah, i edited my comment while you were replying to note that /g is a valid flag for m/// as well. it is a valid perl matching operation precisely as-is but it can’t match anything due to the spaces it has before the ^ and after the $.