I want to remove part uf url using regex_replace I tried below but its not working right. I am trying to remove "index1.php"
Code input:
http://www.myblog.com/blog/content/fruit/index1.php
my code
<mt:getvar name="permalink" regex_replace="/index1\.(php)$/","">
Code output:
http://www.myblog.com/blog/content/fruit/index1.php
But it should be
http://www.myblog.com/blog/content/fruit/
Try the following pattern:
or, try using a capture group: