2017 © Pedro Peláez
 

library compliant-regexps

An easy way to correct user input based on a regular expression

image

thibaud-dauce/compliant-regexps

An easy way to correct user input based on a regular expression

  • Tuesday, August 9, 2016
  • by ThibaudDauce
  • Repository
  • 1 Watchers
  • 0 Stars
  • 79 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 13 Versions
  • 0 % Grown

The README.md

Compliant Regexps

Build Status, (*1)

The main goal of this library is to provide an easy way to correct user input based on regular expressions., (*2)

Installation

composer require thibaud-dauce/compliant-regexps

Usage

The tests folder provides good usage examples., (*3)

Basic usage

<?php

$conciliator = new WhiteSpace;
$possibilities = $conciliator->conciliate('/^Flat J114$/', 'Flat J 114');

// $possibilities = ['FlatJ 114', 'Flat J114']
<?php

$conciliator = new StartWith;
$possibilities = $conciliator->conciliate('/^Flat J114$/', 'J114');

// $possibilities = ['Flat J114']

Only valid results

<?php

$conciliator = new ValidOnly(new WhiteSpace);
$possibilities = $conciliator->conciliate('/^Flat J114$/', 'Flat J 114');

// $possibilities = ['Flat J114']

Multiple conciliators

<?php

$conciliator = new Aggregator([new StartWith, new WhiteSpace]);
$possibilities = $conciliator->conciliate('/^Flat J114$/', 'J 114');

// $possibilities = ['J 114', 'Flat J 114', 'J114', 'FlatJ 114', 'Flat J114']

Or with only valid results:, (*4)

<?php

$conciliator = new ValidOnly(new Aggregator([new StartWith, new WhiteSpace]));
$possibilities = $conciliator->conciliate('/^Flat J114$/', 'J 114');

// $possibilities = ['Flat J114']

The Versions

09/08 2016

dev-master

9999999-dev https://github.com/ThibaudDauce/compliant-regexps

An easy way to correct user input based on a regular expression

  Sources   Download

MIT

The Requires

  • php ^7.0

 

The Development Requires

regexps

09/08 2016

1.6.0

1.6.0.0 https://github.com/ThibaudDauce/compliant-regexps

An easy way to correct user input based on a regular expression

  Sources   Download

MIT

The Requires

  • php ^7.0

 

The Development Requires

regexps

22/06 2016

1.5.3

1.5.3.0 https://github.com/ThibaudDauce/compliant-regexps

An easy way to correct user input based on a regular expression

  Sources   Download

MIT

The Requires

  • php ^7.0

 

The Development Requires

regexps

22/06 2016

1.5.2

1.5.2.0 https://github.com/ThibaudDauce/compliant-regexps

An easy way to correct user input based on a regular expression

  Sources   Download

MIT

The Requires

  • php ^7.0

 

The Development Requires

regexps

22/06 2016

1.5.1

1.5.1.0 https://github.com/ThibaudDauce/compliant-regexps

An easy way to correct user input based on a regular expression

  Sources   Download

MIT

The Requires

  • php ^7.0

 

The Development Requires

regexps

22/06 2016

1.5.0

1.5.0.0 https://github.com/ThibaudDauce/compliant-regexps

An easy way to correct user input based on a regular expression

  Sources   Download

MIT

The Requires

  • php ^7.0

 

The Development Requires

regexps

22/06 2016

1.4.2

1.4.2.0 https://github.com/ThibaudDauce/compliant-regexps

An easy way to correct user input based on a regular expression

  Sources   Download

MIT

The Requires

  • php ^7.0

 

The Development Requires

regexps

22/06 2016

1.4.1

1.4.1.0 https://github.com/ThibaudDauce/compliant-regexps

An easy way to correct user input based on a regular expression

  Sources   Download

MIT

The Requires

  • php ^7.0

 

The Development Requires

regexps

22/06 2016

1.4.0

1.4.0.0 https://github.com/ThibaudDauce/compliant-regexps

An easy way to correct user input based on a regular expression

  Sources   Download

MIT

The Requires

  • php ^7.0

 

The Development Requires

regexps

21/06 2016

1.3.0

1.3.0.0 https://github.com/ThibaudDauce/compliant-regexps

An easy way to correct user input based on a regular expression

  Sources   Download

MIT

The Requires

  • php ^7.0

 

The Development Requires

regexps

21/06 2016

1.2.0

1.2.0.0 https://github.com/ThibaudDauce/compliant-regexps

An easy way to correct user input based on a regular expression

  Sources   Download

MIT

The Requires

  • php ^7.0

 

The Development Requires

regexps

21/06 2016

1.1.1

1.1.1.0 https://github.com/ThibaudDauce/compliant-regexps

An easy way to correct user input based on a regular expression

  Sources   Download

MIT

The Requires

  • php ^7.0

 

The Development Requires

regexps

20/06 2016

1.0.0

1.0.0.0 https://github.com/ThibaudDauce/compliant-regexps

An easy way to correct user input based on a regular expression

  Sources   Download

MIT

The Requires

  • php ^7.0

 

The Development Requires

regexps