I have a file with so many href attributes. I want to modify the path, just want to add absolute path with the existing. e.g
href="parentall_files/filelist.xml" , just needs to be changed to
href="dir/parentall/parentall_files/filelist.xml" throughout the file. I have written the following:
$contents = preg_replace('/<a href="(.*?)"/i', '<a href="dir\/parentall\/$"',$contents);
But alas! it is not changing the path. Please help.