Via sed by: sed -i 's@://[^.]*\.svn\.sourceforge\.net/svnroot/\([^/]*\)@://svn.code.sf.net/p/\1/code@' *.txt