Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $replace = 'TL';
- $string = "profile tl123";
- $str = preg_replace("/{$replace}(?:[^0-9]*)(\d+)/i", "{$replace}-$1", $string);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement