Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Regex On Your Tombstone?

by McD (Chaplain)
on May 19, 2021 at 14:15 UTC ( #11132739=poem: print w/replies, xml ) Need Help??

Hello Monastery - long time, no see.

As the Brothers here grow old and gray (or grey, I suppose - TMTOWTDI), we must surely be contemplating the eternal.

Leading me to wonder this morning... What's a good regular expression for your tombstone?

Maybe:

die "Normal termination" if /life$/;

Share your best idea!

Replies are listed 'Best First'.
Re: Regex On Your Tombstone?
by LanX (Sage) on May 19, 2021 at 19:52 UTC

     
       
         
       
       
     
          __END__      
     
             

    Cheers Rolf
    (addicted to the Perl Programming Language :)
    Wikisyntax for the Monastery

      Ladies and gentlemen, after due consideration, I believe we have a winner. Bonus points for the ascii art. :-)
        > I believe we have a winner.

        Oh great, many thanks. =)

        I couldn't come up with a shorter regex tho...

        > for the ascii art. :-)

        <table> art, please! ;-)

        Cheers Rolf
        (addicted to the Perl Programming Language :)
        Wikisyntax for the Monastery

      Bravo! (I had to log-in just to up-vote this)
        Thanks!

        Seems like I scored an eagle in tombstone golfing ... ;-)

        Cheers Rolf
        (addicted to the Perl Programming Language :)
        Wikisyntax for the Monastery

Re: Regex On Your Tombstone?
by Fletch (Chancellor) on May 19, 2021 at 14:37 UTC

    $socrates =~ m{I drank what\?};

    Edit: reference for those that might need it.

    The cake is a lie.
    The cake is a lie.
    The cake is a lie.

Re: Regex On Your Tombstone?
by LanX (Sage) on May 19, 2021 at 19:45 UTC

     
       
         
       
       
     
     
      use perl or die;  
     
             

    Cheers Rolf
    (addicted to the Perl Programming Language :)
    Wikisyntax for the Monastery

Re: Regex On Your Tombstone?
by VinsWorldcom (Prior) on May 19, 2021 at 18:42 UTC

    Again, not REGEX, but ...

    return bless $self, $class

    Reincarnation?

Re: Regex On Your Tombstone?
by jo37 (Hermit) on May 19, 2021 at 19:32 UTC
    while (/(*FAIL)/) { redo; } END { /(*ACCEPT)/; }

    Greetings,
    -jo

    $gryYup$d0ylprbpriprrYpkJl2xyl~rzg??P~5lp2hyl0p$
Re: Regex On Your Tombstone?
by salva (Canon) on May 21, 2021 at 16:52 UTC
Re: Regex On Your Tombstone?
by Discipulus (Abbot) on May 20, 2021 at 06:17 UTC
Re: Regex On Your Tombstone?
by cavac (Curate) on May 28, 2021 at 15:50 UTC

    s/cavac//g

    Edit: Really a shame that the "e" modifier expects an expression, otherwise i could have used s/cavac//gone. Oh well...

    perl -e 'use Crypt::Digest::SHA256 qw[sha256_hex]; print substr(sha256_hex("the Answer To Life, The Universe And Everything"), 6, 2), "\n";'
      > i could have used s/cavac//gone . Oh well...

      heh! =)

      I tried RIP but the /r is nondestructive and will keep you alive... ;(

      DB<15> $_="cavac" DB<16> s/cavac//rip DB<17> p cavac

      update

      FWIW: I checked for synonyms for "dead", but since "e" is the most common letter in Ænglish ...

      Cheers Rolf
      (addicted to the Perl Programming Language :)
      Wikisyntax for the Monastery

        Hmm, the alternative would be to make the whole thing Terry Pratchett style and make sure the name is bounced around in the protocol overhead forever.

        s/(cavac)/"GNU $1"/

        I actually do something like this in my Net-Clacks IPC for a couple of people.

        perl -e 'use Crypt::Digest::SHA256 qw[sha256_hex]; print substr(sha256_hex("the Answer To Life, The Universe And Everything"), 6, 2), "\n";'

        As one author (can't remember who) once said: "Heroes don't die, they just fade away".

        perl -e 'use Crypt::Digest::SHA256 qw[sha256_hex]; print substr(sha256_hex("the Answer To Life, The Universe And Everything"), 6, 2), "\n";'
Re: Regex On Your Tombstone?
by QM (Parson) on May 31, 2021 at 15:18 UTC
    s/.*//m

    Besides the obvious language puns, a golfed Busy Beaver one-liner would be funny and deep. Heck, even the prime finder regex would be interesting. </code>

    -QM
    --
    Quantum Mechanics: The dreams stuff is made of

Re: Regex On Your Tombstone?
by 1nickt (Abbot) on May 19, 2021 at 15:17 UTC

    Not a regexp but I plan to have "He sure flipped a lot of bits" on mine.


    The way forward always starts with a minimal test.
      He sure flipped a lot of bits
      You might as well get a Spoonerism in there too:

      He sure bipped a lot of flits.

      -QM
      --
      Quantum Mechanics: The dreams stuff is made of

Re: Regex On Your Tombstone?
by bibliophile (Parson) on Jul 15, 2021 at 19:08 UTC

    I'm not done yet...

    s/\eLife/\rLife/;
Re: Regex On Your Tombstone?
by Perlbotics (Bishop) on May 20, 2021 at 17:28 UTC
    "Hier liegen meine Gebeine..." =~ /[Ee]\s+\w{2}b(\w+?)(\w)\b/ and die "ich wollt$2, $2s wär$2n d$1$2!"

    Doesn't rhyme much in English: Here lie my bones, I wished it were yo(u)rs.
    Wikipedia thinks it's by this guy.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: poem [id://11132739]
Approved by jo37
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (4)
As of 2021-12-07 00:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    R or B?



    Results (33 votes). Check out past polls.

    Notices?