$tag_path = "c:\work\link2\\tmp\\5699\\tables";
I want to delete only the last \\tables
in $tag_path
.
I used the code below:
$tag_path = preg_replace("/\\\\tables$/i", "", $tag_path);
But it returned the following result:
c:\work\link2\\tmp\\5699\
Why? How can I delete the last \\tables
in $tag_path
?
If i echo tag_path="c:\work\link2\tmp\5699"
, But i write log tag_path="c:\work\link2\\tmp\\5699\"