1.0.0 • Published 5 years ago
multi-tier-regex v1.0.0
Description
A tool for using multiple tiers of regex on a string.
It gives you the ability to chain together multiple regex operations on strings, including advanaced replacements and remapping
Installation
Latest stable version:
npm i multi-tier-regex
Use as a command line tool:
npm i -g multi-tier-regex
Usage :
Simple Example
example = createRegex(/i+/g, { replace: 'a' });
runRegexes('hiihi', example); // returns 'haha'
Complex Example
exampleA = createRegex(/i+/g, { replace: str => {'this is a fantastic example' + str;} });
exampleB = createRegex(/a../g, { replace: '$1-$1'});
runRegexes('hiihi', exampleA, exampleB); // returns ''
Usage
1.0.0
5 years ago