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,350 points
1,558 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,740 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 2, 2018 in Blockchain by Shashank
• 10,400 points
529 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
834 views
+1 vote
1 answer

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

yes all are over TCP/IP connections secured ...READ MORE

answered Aug 6, 2018 in Blockchain by aryya
• 7,450 points
1,148 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
1,706 views
0 votes
1 answer

Hyperledger Sawtooth vs Quorum in concurrency and speed Ask

Summary: Both should provide similar reliability of ...READ MORE

answered Sep 26, 2018 in IoT (Internet of Things) by Upasana
• 8,620 points
1,237 views
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,740 points
1,815 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP