Skip to content

Helps to create regular expressions in typescript from phrases.

License

Notifications You must be signed in to change notification settings

Fazerty/phrasalExpressions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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();

About

Helps to create regular expressions in typescript from phrases.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published