Hello.
Can someone help me with a regular expression to use with preg_replace?
I have a string with
$path = "c:\dir_images\image_name.gif";
or
$path = "c:\dir\image_name.gif";
That is, I don't know the dirname, it can be any thing.
Then I need that a string like
$path = "c:\dir_images\image_name.gif";
or
$path = "c:\dir\image_name.gif";
or even
$path = "c:\image_name.gif";
to be transformed into
$path = "http://mysite.org/images/image_name.gif
Like:
"c:(anything)(second_anything).gif"
->
"http://mysite.org/images/(second_anything).gif"
If anyone can help out, I would apreciate.
Thanks.