1. Go to this page and download the library: Download jeffpacks/substractor 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/ */
jeffpacks / substractor example snippets
use jeffpacks\substractor\Substractor;
# Checks if a string contains a URL with a subdomain
Substractor::matches(
'https://example.test/welcome.html https://example.test https://sub.example.test/index.html',
'https://*.*.*/' # Trailing slash is important, otherwise the dot in welcome.html would count
));
$markdown = 'You can [e-mail me](mailto:[email protected]) or reach me on [Github](https://github.com/jeffpacks)';
$result = Substractor::subs($markdown, '[*]', ' ');
$markdown = 'You can [e-mail me](mailto:[email protected]) or reach me on [Github](https://github.com/jeffpacks)';
$result = Substractor::subs($markdown, '[*]', [
' ', # pre-redact the space
'[' => false, # false indicates post-redaction
']' => false
]);
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.