Popularity
2.8
Stable
Activity
6.8
-
1,084
50
53

Description

RegExpBuilder integrates regular expressions into the programming language, thereby making them easy to read and maintain. Regular Expressions are created by using chained methods and variables such as arrays or strings.

Code Quality Rank: L5
Monthly Downloads: 0
Programming language: JavaScript
License: MIT License
Tags: RegExp    

RegExpBuilder alternatives and similar libraries

Based on the "RegExp" category

Do you think we are missing an alternative of RegExpBuilder or a related project?

Add another 'RegExp' Library

README

RegExpBuilder

RegExpBuilder integrates regular expressions into the programming language, thereby making them easy to read and maintain. Regular Expressions are created by using chained methods and variables such as arrays or strings.

Examples Here are a couple of examples using Javascript:

const r = require('regexpbuilder');

Money

const regex = r()
  .find('$')
  .min(1).digits()
  .then('.')
  .digit()
  .digit()
  .getRegExp();

regex.test('$10.00'); // true

Nested patterns

const pattern = r()
  .min(1).of('p')
  .min(2).of('q');

const regex = r()
  .exactly(2).like(pattern)
  .getRegExp();

regex.test('pqqpqq'); // true

API documentation RegExpBuilder can represent literally every possible regular expression using methods such as either(), or(), behind(), asGroup() and so on. You can find the API documentation here.