dogecoin-regex
v1.0.10
Published
Regular expression for matching Dogecoin (DOGE) addresses.
Downloads
968
Readme
dogecoin-regex
Regular expression for matching Dogecoin (DOGE) addresses.
Install
~ ❯❯❯ npm install dogecoin-regex
Usage
const dogecoinRegex = require('dogecoin-regex');
dogecoinRegex().test('nodejsrocks DANHz6EQVoWyZ9rER56DwTXHWUxfkv9k2o');
//=> true
dogecoinRegex({exact: true}).test('nodejsrocks DANHz6EQVoWyZ9rER56DwTXHWUxfkv9k2o foo');
//=> false
dogecoinRegex({exact: true}).test('DANHz6EQVoWyZ9rER56DwTXHWUxfkv9k2o');
//=> true
'nodejsrocks DANHz6EQVoWyZ9rER56DwTXHWUxfkv9k2o unicorn DDTtqnuZ5kfRT5qh2c7sNtqrJmV3iXYdGG rainbow'.match(dogecoinRegex());
//=> ['DANHz6EQVoWyZ9rER56DwTXHWUxfkv9k2o', 'DDTtqnuZ5kfRT5qh2c7sNtqrJmV3iXYdGG']
API
dogecoinRegex([options])
Returns a regex for matching Dogecoin (DOGE) addresses.
options.exact
Type: boolean
Default: false
(Matches any DOGE address in a string)
Only match an exact string. Useful with RegExp#test()
to check if a string is an DOGE address.
Related
- ethereum-regex - Regular expression for matching Ethereum (ETH) addresses.
- litecoin-regex - Regular expression for matching Litecoin (LTC) addresses.
- bitcoincash-regex - Regular expression for matching Bitcoin Cash (BCH) addresses.
- monero-regex - Regular expression for matching Monero (XMR) addresses.
- dash-regex - Regular expression for matching Dash addresses.
- ripple-regex - Regular expression for matching Ripple (XRP) addresses.
- neo-regex - Regular expression for matching NEO addresses.
License
MIT © Nikolaos Kamarinakis