mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-02-28 16:47:22 +00:00
Add new formatting regex
This commit is contained in:
parent
101ea1a1e8
commit
0ce971d9d3
1 changed files with 7 additions and 6 deletions
|
|
@ -13,12 +13,13 @@ import (
|
|||
)
|
||||
|
||||
const (
|
||||
reHash = `"0x[0-9a-f]{64}"` // 32 bytes
|
||||
reHashOpt = `"(0x[0-9a-f]{64})"|null` // 32 bytes or null
|
||||
reAddress = `"0x[0-9a-f]{40}"` // 20 bytes
|
||||
reAddressOpt = `"0x[0-9a-f]{40}"|null` // 20 bytes or null
|
||||
reNum = `"0x([1-9a-f][0-9a-f]{1,15})|0"` // must not have left-padded zeros
|
||||
reData = `"0x[0-9a-f]*"` // can be "empty"
|
||||
reHash = `"0x[0-9a-f]{64}"` // 32 bytes
|
||||
reHashOpt = `"(0x[0-9a-f]{64})"|null` // 32 bytes or null
|
||||
reAddress = `"0x[0-9a-f]{40}"` // 20 bytes
|
||||
reAddressOpt = `"0x[0-9a-f]{40}"|null` // 20 bytes or null
|
||||
reNum = `"0x([1-9a-f][0-9a-f]{0,15})|0"` // must not have left-padded zeros
|
||||
reNumOpt = `"0x([1-9a-f][0-9a-f]{0,15})|0"|null` // must not have left-padded zeros or null
|
||||
reData = `"0x[0-9a-f]*"` // can be "empty"
|
||||
)
|
||||
|
||||
func TestNewBlockRes(t *testing.T) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue