5

What is the best, most correct way of regex'ing the address and payment ID for Monero?

Asdax
  • 551
  • 4
  • 12
  • To avoid duplication can you edit this question to better emphasize how it is different? Perhaps focus on the payment ID part (or an integrated address) which was not discussed in the previous question. – Smart Kid Nov 03 '16 at 00:50

1 Answers1

9

A Monero address:

4[0-9AB][123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{93}

A payment ID:

([0-9a-fA-F]{16}|[0-9a-fA-F]{64})
Jonathan Cross
  • 623
  • 5
  • 19
Asdax
  • 551
  • 4
  • 12