Bitcoin Forum
March 19, 2018, 05:43:23 PM *
News: Latest stable version of Bitcoin Core: 0.16.0  [Torrent]. (New!)
   Home   Help Search Donate Login Register  
Pages: [1]
Author Topic: Regular expression for private key base 58?  (Read 3705 times)
Jr. Member
Offline Offline

Activity: 59
Merit: 0

View Profile WWW
May 24, 2013, 03:20:16 AM

I'm writing a bitcoin app and would like to validate addresses somehow.  I found this regex for public addresses:


But I'm looking for one for base 58 private keys as well.  (Base 58 is the import format right?)

I don't know a lot about the rules for these keys/addresses.  If I did I'd just write the regexes myself.  Any help is much appreciated.

My bitcoin game:
Hero Member
Offline Offline

Posts: 1521481403

View Profile Personal Message (Offline)

Reply with quote  #2

Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
Offline Offline

Activity: 1134
Merit: 1005

May Bitcoin be touched by his Noodly Appendage

View Profile
May 24, 2013, 03:00:37 PM

Is that regex working? I'd put some parentheses


Try with some private keys from

Own address: 19QkqAza7BHFTuoz9N8UQkryP4E9jHo4N3 - Pywallet support: 1AQDfx22pKGgXnUZFL1e4UKos3QqvRzNh5 - Bitcointalk++ script support: 1Pxeccscj1ygseTdSV1qUqQCanp2B2NMM2
Pywallet: instructions. Encrypted wallet support, export/import keys/addresses, backup wallets, export/import CSV data from/into wallet, merge wallets, delete/import addresses and transactions, recover altcoins sent to bitcoin addresses, sign/verify messages and files with Bitcoin addresses, recover deleted wallets, etc.
Pages: [1]
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!