Add preview file content with or without regexp