Thats true .. by using s/// regex will remove the N's, but if you need to replace them with randomly generated nucleotide sequence then use this script http://bioinformaticsonline.com/file/view/5307/clean-the-fasta-file which will clean the...
Mostly FASTA file contain NNN characters, which can be replace by random A T G C character with this perl script. It also print the FASTA sequence name, N's counts, nucleotide count and percentage details at command prompt/standard output.