in reply to Replacing the pattern to search for
perl -pi -e 's/<your pattern>/" " x (length($&))/eg' file [download]