Find all files with the name ending in ".txt" in the current directory and its subdirectories up to 3 levels deep, and execute the command "sed -i -e 's@\./[^/]*/@@g' {}" on each of them.
find -maxdepth 3 -iname '*.txt' -exec sed -i -e 's@\./[^/]*/@@g' {} \;