dogecoin-regex
Regular expression for matching Dogecoin (DOGE) addresses.
Install
~ ❯❯❯ npm install dogecoin-regex
Usage
const dogecoinRegex = require('dogecoin-regex');
dogecoinRegex().test('nodejsrocks DANHz6EQVoWyZ9rER56DwTXHWUxfkv9k2o');
dogecoinRegex({exact: true}).test('nodejsrocks DANHz6EQVoWyZ9rER56DwTXHWUxfkv9k2o foo');
dogecoinRegex({exact: true}).test('DANHz6EQVoWyZ9rER56DwTXHWUxfkv9k2o');
'nodejsrocks DANHz6EQVoWyZ9rER56DwTXHWUxfkv9k2o unicorn DDTtqnuZ5kfRT5qh2c7sNtqrJmV3iXYdGG rainbow'.match(dogecoinRegex());
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.
License
MIT © Nikolaos Kamarinakis