phrasalexpressions
TypeScript icon, indicating that this package has built-in type declarations

1.0.12-alpha • Public • Published

phrasalExpressions

Helps to create regular expressions in typescript from phrases.

! Still in dev.

Table of Contents

Installation

This library only works with typescript. Ensure it is installed:

npm install typescript -g

To install phrasalExpressions:

npm install phrasalExpressions --save

Basic Usage

import {Phrexp} from "phrasalExpressions";

//  Regexp to match e character
const regexp1: Regexp = new Phrexp()
                            .findChar('e')
                            .toRegExp();

// Regexp for exactly 3 repetitions of an alphanumeric followed by a tab
const regexp2: RegExp = new Phrexp()
      .beginRepetition(3, 3)
      .findChar('alphanumeric').endRepetition().findChar('tab')
      .toRegExp();

Package Sidebar

Install

npm i phrasalexpressions

Weekly Downloads

1

Version

1.0.12-alpha

License

MIT

Unpacked Size

85.7 kB

Total Files

60

Last publish

Collaborators

  • fazerty