Skip to content

A simple java-script object which allows you to get the text and string location of many groups within a regular expression.

License

Notifications You must be signed in to change notification settings

dlsloan/MultiRegExp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

MultiRegExp

A simple java-script object which allows you to get the text and string location of many groups within a regular expression.

USAGE

var exp = new MultiRegExp(/([a-z]+)(?:\s|_)*([0-9]+)/i);
exp.exec("test_53"); //will return {0: {index:0, text:'test'}, 1: {index:5, text:'53'}}

Note: -This requires that capture groups are not nested use (?:...) when bracets around unneeded blocks are required. -Repitition of capture groups is not permitted as regular expressions only return one of the matched capture groups in the repetition use ((?:match)+) instead.

About

A simple java-script object which allows you to get the text and string location of many groups within a regular expression.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published