What Regex to use to identify a Block Hash?

0 votes

I'm trying to identify if a URL component includes a bitcoin block hash, which looks like 000000000d32098b5faf86d17cb6e1828ac98f3b104f019dd78bfc9fdc1ae7b0

I wanted to know what regex I can use to identify this. Can somebody help me out?

Aug 28, 2018 in Blockchain by slayer
• 29,170 points
51 views

1 answer to this question.

0 votes

Blockhashes are always 64 characters in length.

You can use the following regex to identify the block hash

/^[0-9a-f]{64}$/i

To know more, visit: https://en.bitcoin.it/wiki/Block_hashing_algorithm

answered Aug 28, 2018 by digger
• 26,550 points

Related Questions In Blockchain

0 votes
1 answer

What could be the best term to use for the collection of contracts in a .sol file?

module - don't think so. Because module ...READ MORE

answered Jun 1, 2018 in Blockchain by Shashank
• 10,350 points
38 views
+1 vote
4 answers
+1 vote
1 answer
0 votes
1 answer

In a Blockchain, how difficult is it to modify the third to last block?

Technically, it's not difficult at all, all ...READ MORE

answered Apr 20, 2018 in Blockchain by Christine
• 15,790 points
79 views
0 votes
1 answer

Protocols used in a distributed/dlt system for the nodes to establish communication

yes all are over TCP/IP connections secured by TLS encryption in hashgraph architecture-hashgraph, ...READ MORE

answered Aug 6, 2018 in Blockchain by ariaholic
• 7,340 points
90 views
0 votes
1 answer

Truffle tests not running after truffle init

This was a bug. They've fixed it. ...READ MORE

answered Sep 11, 2018 in Blockchain by Christine
• 15,790 points
169 views
0 votes
1 answer
0 votes
1 answer

How to create a Genesis Block in a Private Network?

{     "nonce": "0x0000000000000042",     "difficulty": "0x000000100",     "alloc": {     },     "mixhash": "0x0000000000000000000000000000000000000000000000000000000000000000",     "coinbase": "0x0000000000000000000000000000000000000000",     "timestamp": "0x00",     "parentHash": ...READ MORE

answered Jul 12, 2018 in Blockchain by digger
• 26,550 points
257 views