1. Go to this page and download the library: Download damilarekoiki/phpregex 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/ */
damilarekoiki / phpregex example snippets
use DamilareKoiki\PhpRegex\Regex;
$regex = Regex::build()
->beginsWith('INV')
->then('-')
->digits()
->endsWith('.pdf');
if ($regex->matches('INV-12345.pdf')) {
// It's a match!
}
// ❌ This will insert 'bar' at the start of the string if 'foo' exists anywhere.
Regex::build()->contains('foo')->replace('I have foo', 'bar');
// ✅ This will replace 'foo' with 'bar'.
Regex::build()->then('foo')->replace('I have foo', 'bar');
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.