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

  • 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 3 '16 at 0:50

A Monero address:


A payment ID:

|improve this answer|||||
  • [0-9a-fA-F]{64} – user36303 Nov 1 '16 at 17:36
  • 1
    I believe | is useless in the first regexp – Kukunin Sep 2 '17 at 8:25
  • 1
    The | was actually an error (worse than useless) because it would match a literal pipe character. Now fixed. – Jonathan Cross Sep 20 '17 at 12:01
  • Address could be reduced: ^4[0-9AB][1-9A-HJ-NP-Za-km-z]{93}$ – Jefrey Sobreira Santos Feb 24 '18 at 19:14

Not the answer you're looking for? Browse other questions tagged or ask your own question.