Answer the question
In order to leave comments, you need to log in
How to parse a Bitcoin address using JavaScript?
Hello, I need to parse a bitcoin address.
Here is an example: https://jsfiddle.net/congrammer/Ej25j/2371/
The task is to parse only what is in any tags, i.e.:
<small>адрес</small>
<div>адрес</div>
<h1>адрес</h1>
и.т.д
var re = new RegExp("([a-zA-Zа-я0-9]{27,34})", "g");
alert(document.body.innerHTML.match(re))
Answer the question
In order to leave comments, you need to log in
If you want to do something, do it yourself!
var re = new RegExp("[^/\"//\'/a-zA-Z0-9]([1|3][^IlO0][a-zA-Z1-9]{26,34})", "g");
document.body.innerHTML.match(re)
https://en.bitcoin.it/wiki/Technical_background_of... read until you are fully enlightened, Comrade Hacker.
Bitcoin address regular (P2PKH, P2SH, Bech32)
^(bc(0([ac-hj-np-z02-9]{39}|[ac-hj-np-z02-9]{59})|1[ac-hj-np-z02-9]{8,87})|[13][a-km-zA-HJ-NP-Z1-9]{25,35})$
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question