Regular Expression

Online regular expression tester for Javascript and PHP

Whats is Regular Expression?

A regular expression is a pattern that the regular expression engine attempts to match in input text. A pattern consists of one or more character literals, operators, or constructs.

Now we will see 2 tools that allow us to test our regular expressions and generate them if we do not know much about this topic.

Regex101

This tool will help us test our regular expressions to know if in fact the expression performs work that we want to.

Regex101

Regex101

Txt2re

This tool is very good and much more simple, ideal for developers who do not know very well the subject of regular expressions. It is that this tool allows us to insert any text and starting from this, select part of the text or full text to which we want to to generate us the regular expression that we use in our code.

Txt2re.com

Txt2re.com

Anuncios

Install Composer on Windows

Using the Installer

This is the easiest way to get Composer set up on your machine.

Download and run Composer-Setup.exe, it will install the latest Composer version and set up your PATH so that you can just call composer from any directory in your command line.

Note: Close your current terminal. Test usage with a new terminal: That is important since the PATH only gets loaded when the terminal starts.

 

Manual Installation

Change to a directory on your PATH and run the install snippet to download composer.phar:

C:\Users\username>cd C:\bin
C:\bin>php -r "readfile('https://getcomposer.org/installer');" | php
Note: If the above fails due to readfile, use the http url or enable php_openssl.dll in php.ini

Create a new composer.bat file alongside composer.phar:

C:\bin>echo @php "%~dp0composer.phar" %*>composer.bat

Close your current terminal. Test usage with a new terminal:

C:\Users\username>composer -V
Composer version 27d8904

Using Composer

We will now use Composer to install the dependencies of the project. If you don’t have a composer.json file in the current directory please skip to the Basic Usage chapter.

To resolve and download dependencies, run the install command:

php composer.phar install

If you did a global install and do not have the phar in that directory run this instead:

composer install