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.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package easyregex

Laravel EasyRegex Package

Issues Stars Downloads License

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

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.
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package darshphpdev/easyregex contains the following files

Loading the files please wait ....