Download the PHP package darshphpdev/easyregex without Composer
On this page you can find all versions of the php package darshphpdev/easyregex. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download darshphpdev/easyregex
More information about darshphpdev/easyregex
Files in darshphpdev/easyregex
Download darshphpdev/easyregex
More information about darshphpdev/easyregex
Files in darshphpdev/easyregex
Vendor darshphpdev
Package easyregex
Short Description Simple Regex Pattern Generator and Validator
License MIT
Package easyregex
Short Description Simple Regex Pattern Generator and Validator
License MIT
Please rate this library. Is it a good library?
Informations about the package easyregex
Laravel EasyRegex Package
Simple Regex Pattern Generator and Validator.
Regular expressions are dense. This makes them hard to read, but not in proportion to the information they carry. It has a very terse syntax and if you make even the smallest mistake it won’t perform as expected.
It's Ok. Writing regular expressions will not be your biggest fears any more!
INSTALLATION
Install the package through Composer.
composer require darshphpdev/easyregex
CONFIGURATION
Optional: The service provider will automatically get registered. Or you may manually add the service provider to providers array in your config/app.php file:
HOW TO USE
- Quick Usage
- Usage
- Examples
- Credits
- License
Quick Usage
Usage
Table Of Helper Regex Functions
Use the following function to build your regex string.
Function | Description | Arguments |
---|---|---|
make() | Initialize the builder object, set the default wrapper delimiter / | $delimiter (Optional) |
startsWith() | Inserts the start with regex symbol | - |
onceOrMore() | Repeat the preceding letter/pattern once or more | - |
zeroOrMore() | Repeat the preceding letter/pattern zero times or more | - |
anyChar() | Matches any character or digit including special ones. | - |
tab() | Matches tab | - |
newLine() | Matches new line | - |
whitespace() | Matches white space | - |
anyWord() | Matches any word (letters or digits) | - |
literally() | Matches any single letter or set of letters or pattern including special chars and meta chars | $str (Required) |
anyLetterOf() | Matches one letter of the given single or multiple parameters | $letters (Required) |
exceptLetterOf() | Ignores one letter of the given single or multiple parameters | $letters (Required) |
letterPatternOf() | Matches the whole letter set with the given sorting. | $letters (Required) |
exceptPatternOf() | Matches any thing except for the whole letter set with the given sorting. | $letters (Required) |
digit() | Matches any digit | - $min (Optional) default[0] - $max (Optional) default[9] |
notDigit() | Matches any thing except any digit | - $min (Optional) default[0] - $max (Optional) default[9] |
atLeast() | Matches Repeating the preceding pattern at least $number of times | $number (Required) |
atMost() | Matches Repeating the preceding pattern at most $number of times | $number (Required) |
smallLetter() | Matches any small letter between $min and $max letters | - $min (Optional) default[a] - $max (Optional) default[z] |
exceptSmallLetters() | Matches any small letter except those between $min and $max letters | - $min (Optional) default[a] - $max (Optional) default[z] |
capitalLetters() | Matches any capital letter between $min and $max letters | - $min (Optional) default[A] - $max (Optional) default[Z] |
exceptCapitalLetters() | Matches any capital letter except those between $min and $max letters | - $min (Optional) default[A] - $max (Optional) default[Z] |
optional() | Make the preceding pattern optional | - |
rawRegex() | Add raw regex string | $rawString |
where() | Group set of regex expressions | Closure function(){} |
toRegexString() | Return the final Regex string. | - |
match() | Validate your $input against the generated regex string | $input (Required) |
Examples
More examples!
Any suggestions or enhancements are very welcomed.
Credits
License
The EasyRegex Package is open-sourced software licensed under the MIT license
All versions of easyregex with dependencies
PHP Build Version
Package Version
No informations.
The package darshphpdev/easyregex contains the following files
Loading the files please wait ....