DEV Community

drake
drake

Posted on

匹配不同公链地址的正则

address_re_patterns = ['(^[13][a-km-zA-HJ-NP-Z0-9]{25,34}$)|(^bc1[a-zA-Z0-9]{38,59}$)', '^0x[A-Fa-f0-9]{64}$', '^[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{44}$', '^UQ[0-9a-zA-Z_]{46}$', '^0x[A-Fa-f0-9]{40}$', '^T[A-Za-z1-9]{33}$', '^addr[0-9a-zA-Z]{54}$', '^1[1-9A-HJ-NP-Za-km-z]{47}$']

Enter fullscreen mode Exit fullscreen mode

Top comments (0)