Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $re = '/Mauer|Feuer|ue/';
- $str = 'Mauer Mueller Feuer Schueler';
- $result = preg_replace_callback($re, function($matches) {
- return $matches[0] === 'ue' ? 'ü' : $matches[0];
- }, $str);
- var_dump($result);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement