<p>There is no simple algorithm to estimate the difficulty. Doing that requires you to first determine the <a href="http://en.wikipedia.org/wiki/Cardinality" rel="nofollow">cardinality</a> of the <a href="http://en.wikipedia.org/wiki/Intersection_%28set_theory%29" rel="nofollow">intersection</a> between the <a href="http://en.wikipedia.org/wiki/Regular_Language" rel="nofollow">regular language</a> expressed by the input regular expression, and the set of all valid public keys.</p>

CC BY-SA 3.0
2014-03-14T22:51:10.727Z
2014-03-14T22:51:10.727Z
uminatsu
<p>Assuming the output is random:</p>

<p>How many randomly generated texts (in the base58 dictionary that *coin addresses use) are going to match my regex?</p>

<p>The output is not exactly random, so that's a shame, but it will give you a good enough indication.</p>

<p>Remember they call it vanity addresses for a good reason! It's all kind of vain.</p>

CC BY-SA 3.0
2014-03-15T01:17:52.190Z
2014-03-15T01:17:52.190Z
Lodewijk
<p>Using regular expression match instead of prefix, is there a way to add a difficulty and probability check? Seems to only report keys/s and total keys tested. </p>

CC BY-SA 3.0
2014-03-14T22:34:14.937Z
I don't think vanitygen does much beyond generating addresses and checking them.
John T
<bitcoind><vanitygen>
Vanitygen regular expression match
user14498
# Vanitygen regular expression match

(Asked by: username_0 on 2014-03-14)

Using regular expression match instead of prefix, is there a way to add a difficulty and probability check? Seems to only report keys/s and total keys tested.

**Tags:** bitcoind, vanitygen

> **Comments:**
> **username_1**: I don't think vanitygen does much beyond generating addresses and checking them.  

---

## 2 answers

### Answer by username_2 on 2014-03-14. Score: 1

There is no simple algorithm to estimate the difficulty. Doing that requires you to first determine the [cardinality](http://en.wikipedia.org/wiki/Cardinality) of the [intersection](http://en.wikipedia.org/wiki/Intersection_%28set_theory%29) between the [regular language](http://en.wikipedia.org/wiki/Regular_Language) expressed by the input regular expression, and the set of all valid public keys.


---

### Answer by username_3 on 2014-03-15. Score: 0

Assuming the output is random:

How many randomly generated texts (in the base58 dictionary that \*coin addresses use) are going to match my regex?

The output is not exactly random, so that's a shame, but it will give you a good enough indication.

Remember they call it vanity addresses for a good reason! It's all kind of vain.


---

