Why Nostr? What is Njump?
2023-08-21 20:24:53
in reply to

gram on Nostr: npub1e7vnd…5flg9 My code-golf-ready solution: repl = lambda m: f'{len(m.group(1))}' ...



My code-golf-ready solution:

repl = lambda m: f'{len(m.group(1))}'
re.sub('\w(\w{3,})\w', repl, text)

Or something like this, I can't check it from phone. I think it might eat away the first and last letter but it should be easy to make repl a normal function that includes them.

I wonder if I can make it more cursed. Go full regex, perhaps? 🤔
Author Public Key
npub1h65r48d890s5mu6awnsl27tuvnjnuzgw7f8whme5svc3kgjqzvxsgc9s6j