@jonstuebe/regex-named-groups

0.1.1 • Public • Published

regex-named-groups

Install

npm install @jonstuebe/regex-named-groups --save

Usage

const regexNamedGroups = require("@jonstuebe/regex-named-groups");

const regex = /^([A-Z_]*?):[\ ]*?([^\ ]*?)$/gm;
const text = `
NODE_ENV:         development
NODE_PATH:        .
DEBUG_MODE:       false
`;

const matches = regexNamedGroups(text, regex, ["key","value"]);

Readme

Keywords

none

Package Sidebar

Install

npm i @jonstuebe/regex-named-groups

Weekly Downloads

0

Version

0.1.1

License

MIT

Last publish

Collaborators

  • jonstuebe