sed s|\(<img[^>]*src="\)\([^"]*\)\("[^>]*>\)|\1./my/new/data/dir/\2\3|g ex3.html
