Bitcoin Forum
June 03, 2024, 04:13:56 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: RegEx to match transaction id?  (Read 1441 times)
Tonako (OP)
Newbie
*
Offline Offline

Activity: 26
Merit: 0


View Profile
April 08, 2014, 05:10:50 AM
 #1

Hello all

Please help me make a regular expression for PHP

[a-zA-Z0-9] and 65 characters?

'/^[a-zA-Z0-9]{65}$/' - true ?)))
jeffg
Newbie
*
Offline Offline

Activity: 30
Merit: 0


View Profile WWW
April 08, 2014, 12:47:06 PM
 #2

Hello all

Please help me make a regular expression for PHP

[a-zA-Z0-9] and 65 characters?

'/^[a-zA-Z0-9]{65}$/' - true ?)))

Should be a-f and only 64 chars (32bytes):

Code:
[a-fA-F0-9]{64}
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!