https://github.com/codecalm/odmiana-imion
https://github.com/codecalm/odmiana-imion
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/codecalm/odmiana-imion
- Owner: codecalm
- License: mit
- Created: 2018-03-15T20:49:40.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2020-01-14T16:28:33.000Z (over 6 years ago)
- Last Synced: 2025-08-01T14:08:55.537Z (11 months ago)
- Size: 6.84 KB
- Stars: 3
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# odmiana-imion
```php
$regexes = json_decode(file_get_contents('regexes.json'));
function replace_name($name) {
global $regexes;
foreach ($regexes as $from => $to) {
if(preg_match('/'.$from.'/i', $name)) {
return preg_replace('/'.$from.'/i', $to, $name);
}
}
return $name;
}
```