Skip to content

A simple regular expression library with verbal matching and variable binding

Notifications You must be signed in to change notification settings

guanlun/simple-regex

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

simple-regex

SimpleRegex is a simple regular expression library with verbal matching and variable binding.

Example:

var dateStr = 'Thu Jan 14 16:23:24 HKT 2016';

var simpleRegex = new SimpleRegex(dateStr)
  .oneOrMany().letter().bindVar('dayOfWeek')
  .then(' ')
  .oneOrMany().letter().bindVar('month')
  .then(' ')
  .oneOrMany().number().bindVar('dayOfMonth')
  .then(' ')
  .until(' ').bindVar('time');

console.log(simpleRegex.matches);

About

A simple regular expression library with verbal matching and variable binding

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published