Great idea!

But I would not limit the length check, if a single char is added by error the regex fails and you show the key.

I would use 'nsec1[a-z0-9]{16,}'.

PS: Why the final $? I don't use python, perhaps his regex engine has something special.

Reply to this note

Please Login to reply.

Discussion

Great call! I’ll remove the end limit and the $. $ is an anchor that matches the end of the string and it’s not needed for this re search.

Ah in fact, so the same regex use I'm used to.

We have saved a couple of burned keys ;)