I have this line in one of my scripts and its throwing a deprecated error.
eregi_replace( '\.([a-z]{3,4})$', "-{$width}x{$height}.\\1", $src );
Can someone show me how to turn this into preg_replace
and tell me why and which bits of it need to change so I can learn for future changes? I have had a go myself but where this bit of code is means its really hard to test!!
Is it as simple as purely replacing the eregi_replace
with preg_replace
?
I hate regular expressions :)