For people that want to do a simple verification of a Monero address to ensure it has been entered correctly, what are some methods that can be employed?
Credit goes to /u/binaryfate for the useful info.
This is better:
And payment ID:
There are some inappropriate regexes to the other answers here. At this time, only ferretinjapan's answer is correct, though it's a mouthful since it does not use ranges.
This regex will match (non-integrated) Monero addresses:
An integrated address has 106 or 136 characters and that the second character may be any base58 character (verification needed; this is a result of changing the netbyte prefix). A regex to match just integrated (either 64-bit or full 256-bit) addresses would be:
A regex to match standard, integrated, or full 256-bit integrated addresses would be:
With any of these answers, if you are extracting addresses from larger bodies of text, you likely want to replace the
$ anchors with
\b word boundary markers.
Long time ago someone pointed to me this regex to address
I belive its an more complete one, I am using it on PHP-Monero