PHP code example of adambullmer / usdl-regex

1. Go to this page and download the library: Download adambullmer/usdl-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/ */

    

adambullmer / usdl-regex example snippets


$options = array(
    'verbose'         => FALSE,
    'caseInsensitive' => FALSE,
);
$validator = new USDLRegex/Validator($options);

$validator->validate('TX', '12345678');  // TRUE
$validator->validate('TX', '123456789'); // FALSE