@msnraju/reg-expressions
v1.0.3
Published
Custom implementation of regular expressions
Downloads
1
Readme
regular-expression
Custom implementation of regular expressions
Installation
npm install @msnraju/regular-expressions
Usage
import { RegExpression } from '@msnraju/reg-expressions';
const expr = new RegExpression('OBJECT (\\w*) ([\\d]*) (.*)');
const match = expr.match('OBJECT Table 18 Customer');
console.log(JSON.stringify(match, null, 2));
Output
{
"0": "OBJECT Table 18 Customer",
"1": "Table",
"2": "18",
"3": "Customer",
"length": 40
}