HIVE username Regex | Round 2
Yesterday I made a post about a HIVE username Regex & an open-source tester against the 2,409,078 existing usernames of the HIVE Blockchain I made.
On the 2,409,078 usernames it failed 11 due to "--"
I was sure the rules of a correct username on the HIVE Blockchain were:
.is the segment separator
Each segment must be at least 3 characters long
Each segment must begin with a letter (a-z) and end with a letter or a number (0-9)
All letters contained in a segment must be lowercase
Hyphens (-) must be accompanied side by side by letters or numbers
But it looks like I was wrong! The last rule doesn't exist in the core of HIVE as you can see below (Thanks to for providing it)
https://gitlab.syncad.com/hive/hive/-/blob/master/libraries/protocol/authority.cpp#L46
Even Steemit, who created the code base, doesn't respect it on their frontend and shows you this error "Account name should contain only one dash in a row"
So this morning I reviewed my Regex and regretfully removed the last rule that gave it its beauty as a beautiful mathematical equation. You can see the new Regex below
^(?=.{3,16}$)[a-z][0-9a-z\-]{1,}[0-9a-z]([\.][a-z][0-9a-z\-]{1,}[0-9a-z]){0,}$
It passed the test with success the 2,409,204 existing usernames of the HIVE Blockchain (Yep, today there are more Hivians than yesterday!)
I also made some tests of the auto-generated file
I invite
and all those who have a signup process (frontend or library) with this rule to review their code ;)
Vote for my HIVE block producer account (witness): click here (via HiveSigner)
Original Cover Photo of this post by Daniele Levis Pelusi on Unsplash
Leave HIVE username Regex | Round 2 to:
Read more #hive-139531 posts
Best Posts From Mintrawa | hive-fr.com
We have not curated any of mintrawa's posts yet. But you can encourage our curation team to review posts by visiting them regularly and by referring other readers. Because we give priority to frequently read content.
More Posts From Mintrawa | hive-fr.com
- A French expat in a Thai Hospital - fr/en
- 🐉 Nouvel An Chinois 🐲 & Patong Beach 🏖️
- Japan: ⛩️🌸 A trip like no other
- [IA] Créer une video à partir d'une image et d'un texte
- [WITNESS] Hive HardFork 26 - Preparation
- Chill & Relax en Thailande? (fr/en)
- Accueil & Bienvenue sur le HIVE FR
- HIVE username Regex | Round 2
- HIVE username Regex checker
- HIVE vote expiration, Why? Pourquoi??
- HIVE post ➡️ Tweet & Posh Token - fr/en
- Hang Out in Phuket (fr/en)
- Stream IRL: Smartphone ➡️ SRT (h265) ➡️ OBS ➡️ Twitch
- Khao Rang Viewpoint
- Festival les lumières magiques de la mer d'Andaman
- 🐝 Les NEWS 📰 en Bref
- 🏍️ Grosses motos & Vieilles bagnoles 🚘 fr/en
- [HIVE witness] News + Twitch stream + Flashback
- Hive Authentication Client (HAC)
- HIVE Nodes Checker - version 0.0.6