PHP code example of hotmeteor / regex

1. Go to this page and download the library: Download hotmeteor/regex library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

hotmeteor / regex example snippets


Regex::isAlpha($subject, $allowWhitespace = false)

Regex::isAlphanumeric($subject, $allowWhitespace = false)

Regex::isAlphadash($subject, $allowWhitespace = false)

Regex::isDigits($subject, $allowWhitespace = false)

Regex::isNumeric($subject)

Regex::isUuid($subject)

Regex::isIp($subject) // or
Regex::isIpv4($subject)

Regex::isIpv6($subject)

Regex::alpha($subject, $replace = '')

Regex::alphanumeric($subject, $replace = '')

Regex::alphadash($subject, $replace = '')

Regex::digits($subject, $replace = '')

Regex::numeric($subject, $replace = '')

Regex::uuid($subject)

Regex::ip($subject) // or
Regex::ipv4($subject)

Regex::ipv6($subject)