IPED icon indicating copy to clipboard operation
IPED copied to clipboard

Regex for TRON addresses

Open filipesimoes opened this issue 1 year ago • 3 comments

TRON addresses are very common nowadays because of USDT token transactions. A regex for TRON addresses would be very useful.

References: TRON Account, TRON Validator

filipesimoes avatar Nov 10 '23 13:11 filipesimoes

Thanks for pointing @filipesimoes. Do you have a regex suggestion?

lfcnassif avatar Nov 10 '23 14:11 lfcnassif

@lfcnassif I think it's simple as T[A-Za-z1-9]{33} (base58 string with length 34 and starting with a uppercase T). Probably it will result in a lot of false positives. The validation will be required also.

filipesimoes avatar Nov 10 '23 20:11 filipesimoes

Sorry I was in a hurry and didn't read the reference. Seems a validator would be needed indeed.

lfcnassif avatar Nov 10 '23 21:11 lfcnassif