What is the BNB Java/Kotlin regex?

Hello dear developers,

I am planning on adding BNB withdrawals to my app. For security purposes and to avoid wrong addresses, I will be verifying the BNB address on the app. Does someone know the BNB Java/Kotlin regex?

If there is any site or resource that has this kind of information, I would appreciate it a lot if you could point me there too. Not just for BNB, but for other coins too.

Thank you for reading and for any potential answers.

Endpiont /sapi/v1/capital/config/getall returns details of all coins supported in Exchange.
It includes the coin format regex, which may be helpful.

E.g. BNB has 3 different networks, the address format regex for each of them are:

  • “network”: “BSC”
    • “addressRegex”: “^(0x)[0-9A-Fa-f]{40}$”,
  • “network”: “BNB”
    • “addressRegex”: “^(bnb1)[0-9a-z]{38}$”
  • “network”: “ETH”
    • “addressRegex”: “^(0x)[0-9A-Fa-f]{40}$”