PHP code example of lochmueller / sourceopt
1. Go to this page and download the library: Download lochmueller/sourceopt 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/ */
lochmueller / sourceopt example snippets
config.replacer {
search {
1 = /(?<="|')\/?(fileadmin|typo3temp|uploads)/
give-me-cherries = /fruit/
wrapBoldly < tmp.find
wrapBoldly.wrap = /|/
}
replace {
1 = //cdn.tld/$1
give-me-cherries = cherry
wrapBoldly < tmp.repl
wrapBoldly.wrap = <b>|</b>
}
}