i have bunch of htmls on my disk and I know absolute adress of each of them, now I want to make every instance of src="", href="" inside a tags like a, script, img, iframe etc. to point to absolute patch if the given path is relative.
I do not know what is the fastest way to do it, by regex, preg_match_all etc ? I want this script to have awareness of paths like "../../somefile.html".