0.2.0 • Published 8 years ago

re_expand v0.2.0

Weekly downloads
1
License
ISC
Repository
-
Last release
8 years ago

re_expand

  • Generates all text strings that match the given regexp

  • "(a|b)(1|2)".expand() => ["a1", "a2", "b1", "b2"]

  • If a filter pattern is given, the output is filtered by the pattern.

Resources

Install

$ npm install re_expand

Usage

see sample/*.coffee.

require 're_expand'

console.log "(a|b|c)(x|y|z)(1|2|3)".expand()
Generator = require 're_expand'

generator = new Generator()
generator.add "(abc|def)(ghi|jkl)", 'Pattern "$1" and "$2".'
f = (a, cmd) -> console.log "#{a} => #{cmd}"
generator.filter " a ", f, 0
0.2.0

8 years ago

0.1.1

8 years ago

0.1.0

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago