in reply to Mnemonic for begin/end chars in regexes

Found this nice one from Antony Panozzo’s blog:

Regular expressions are perfect, like the Garden of Eden. Snakes end the Garden of Eden.
The $ looks like a snake.

🌸

Replies are listed 'Best First'.
Re^2: Mnemonic for begin/end chars in regexes
by LanX (Saint) on May 13, 2023 at 10:11 UTC
    To complete your Eden analogy:
    
     ^
    /👁\
    
    

    The caret reminds me of a floating triangle.

    The Eye of Providence is a symbol for God, "the beginning of all".

    edit

    Depicted on millions of $-bills ... ;)

    Cheers Rolf
    (addicted to the 𐍀𐌴𐍂𐌻 Programming Language :)
    Wikisyntax for the Monastery

      It looks like a very Perlish interpretation indeed, possibly one of the most appropriate. I’ll keep digging into this. It also nicely links to the masonry mnemonic that @Discipulus gave, the roof caret and pay bill in the end.

      🌸
        > very Perlish interpretation

        well, you can try to expand this to a whole bunch of metaphors for a "Genesis of Regex" story

        • . dust/sand is found everywhere
        • { } Adam and Eve counting things (and being too nosy ;)
        • * + stars are infinite
        • ( ) clouds (or moons) covering things
        • [abc] Noah's ark with each specimen once
        • \b anchors
        • ... and so on.

        I think with some illustrations this could stick well in the head. :)

        Cheers Rolf
        (addicted to the 𐍀𐌴𐍂𐌻 Programming Language :)
        Wikisyntax for the Monastery

        Update

        For completeness, from prior posts

      • ^ God, the beginning of all
      • $ the snake, the end of paradise
Re^2: Mnemonic for begin/end chars in regexes
by Smonff (Monk) on May 13, 2023 at 08:46 UTC