All Projects → k4m4 → ethereum-regex

k4m4 / ethereum-regex

Licence: MIT license
Ξ Regular expression for matching Ethereum (ETH) addresses.

Programming Languages

javascript
184084 projects - #8 most used programming language
typescript
32286 projects

Projects that are alternatives of or similar to ethereum-regex

cryptaddress.now
A minimal service to detect which cryptocurrency an address corresponds to.
Stars: ✭ 23 (+21.05%)
Mutual labels:  regex, matcher, regex-match, cryptocurrency-regex
pamatcher
A pattern matching library for JavaScript iterators
Stars: ✭ 23 (+21.05%)
Mutual labels:  regex, matcher
js-diacritic-regex
Creates the inverse of transliterated string to a regex. What? Basically, diacritic insensitiveness
Stars: ✭ 20 (+5.26%)
Mutual labels:  regex, regex-match
Micromatch
Contributing Pull requests and stars are always welcome. For bugs and feature requests, please create an issue. Please read the contributing guide for advice on opening issues, pull requests, and coding standards.
Stars: ✭ 1,979 (+10315.79%)
Mutual labels:  regex, matcher
Grab
experimental and very fast implementation of a grep
Stars: ✭ 230 (+1110.53%)
Mutual labels:  regex
Pluck
Pluck text in a fast and intuitive way 🐓
Stars: ✭ 202 (+963.16%)
Mutual labels:  regex
Fancy Regex
Rust library for regular expressions using "fancy" features like look-around and backreferences
Stars: ✭ 199 (+947.37%)
Mutual labels:  regex
Lolcate Rs
Lolcate -- A comically fast way of indexing and querying your filesystem. Replaces locate / mlocate / updatedb. Written in Rust.
Stars: ✭ 191 (+905.26%)
Mutual labels:  regex
Awesome Ci
Awesome Continuous Integration - Lot's of tools for git, file and static source code analysis.
Stars: ✭ 254 (+1236.84%)
Mutual labels:  regex
Nsstringmask
NSStringMask allows you to apply masks or formats to NSStrings using NSRegularExpression to input your format.
Stars: ✭ 242 (+1173.68%)
Mutual labels:  regex
Tj
stdin line timestamps. single binary, no dependencies. osx & linux & windows. plays well with jq.
Stars: ✭ 218 (+1047.37%)
Mutual labels:  regex
Retina
A regex-based programming language.
Stars: ✭ 202 (+963.16%)
Mutual labels:  regex
Swaglyrics For Spotify
📃 Get lyrics of currently playing Spotify song so you don't sing along with the wrong ones and embarrass yourself later. Very fast.
Stars: ✭ 235 (+1136.84%)
Mutual labels:  regex
Regexpu
A source code transpiler that enables the use of ES2015 Unicode regular expressions in ES5.
Stars: ✭ 201 (+957.89%)
Mutual labels:  regex
Rverbalexpressions
💬 Create regular expressions easily
Stars: ✭ 245 (+1189.47%)
Mutual labels:  regex
Common Regex
🎃 常用正则表达式 - 收集一些在平时项目开发中经常用到的正则表达式。
Stars: ✭ 2,488 (+12994.74%)
Mutual labels:  regex
Rainbow
🌈 Colorize commands output or STDIN using patterns.
Stars: ✭ 217 (+1042.11%)
Mutual labels:  regex
Regex For Regular Folk
🔍💪 Regular Expressions for Regular Folk — A visual, example-based introduction to RegEx [BETA]
Stars: ✭ 242 (+1173.68%)
Mutual labels:  regex
Learn gnugrep ripgrep
Example based guide to mastering GNU grep and ripgrep
Stars: ✭ 204 (+973.68%)
Mutual labels:  regex
Stringi
THE String Processing Package for R (with ICU)
Stars: ✭ 204 (+973.68%)
Mutual labels:  regex

ethereum-regex Build Status XO code style

Regular expression for matching Ethereum (ETH) addresses

Install

~ ❯❯❯ npm install ethereum-regex

Usage

const ethereumRegex = require('ethereum-regex')

ethereumRegex().test('nodejsrocks 0x281055afc982d96fab65b3a49cac8b878184cb16')
//=> true

ethereumRegex({exact: true}).test('nodejsrocks 0x281055afc982d96fab65b3a49cac8b878184cb16 foo')
//=> false

ethereumRegex({exact: true}).test('0x281055afc982d96fab65b3a49cac8b878184cb16')
//=> true

'nodejsrocks 0x6f46cf5569aefa1acc1009290c8e043747172d89 unicorn 0x90e63c3d53e0ea496845b7a03ec7548b70014a91 rainbow'.match(ethereumRegex())
//=> ['0x6f46cf5569aefa1acc1009290c8e043747172d89', '0x90e63c3d53e0ea496845b7a03ec7548b70014a91']

API

ethereumRegex([options])

Returns a regex for matching Ethereum (ETH) addresses.

options.exact

Type: boolean
Default: false (Matches any ETH address in a string)

Only match an exact string. Useful with RegExp#test() to check if a string is an ETH address.

Related

  • 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.
  • dogecoin-regex - Regular expression for matching Dogecoin (DOGE) addresses.

License

MIT © Nikolaos Kamarinakis

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].