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 N's with random A T G C characters.
You can use a s/// regex like this:
Thanks