remove space and replace in notepad

i want to remove all the spaces in the attached notepad.txt file and replace with a " | ".

when i do a find and replace and press the Space bar, then put the | in the replace it does not do anything. this is in notepad++

generally i am doing this when i take data from excel and need to put it into a .txt file in notepad. i always get spaces where the cells separate the data in excel. maybe there is a way to format the excel spreadsheet when i save it so the spaces are not there in the .txt file? expert-exchange-example.txt
g11mediaAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Ingeborg Hawighorst (Microsoft MVP / EE MVE)Microsoft MVP ExcelCommented:
Hello,

some of the spacing between your columns are tab signs, not spaces. This probably means that in Excel as the source of the file, you have empty columns.

remove the Empty columns and the save your Excel file again, then then you can replace spaces with | just fine.

cheers, teylyn
0
Saqib Husain, SyedEngineerCommented:
These are tabs and not spaces.

Select one of those tabs and press ctrl-c to copy it
paste it in the search-replace dialog box instead of the space.
The rest you know

Saqib
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Ingeborg Hawighorst (Microsoft MVP / EE MVE)Microsoft MVP ExcelCommented:
Or save your Excel file as a CSV file with commas to separate the fields, then replace commas with |

cheers,
0
Bootstrap 4: Exploring New Features

Learn how to use and navigate the new features included in Bootstrap 4, the most popular HTML, CSS, and JavaScript framework for developing responsive, mobile-first websites.

IrishStudentCommented:
Hmm not sure how you would do this in notepad++ as I don't use it.

But if you can locate the .txt file open it with Wordpad click replace, this will open the replace box.

Place your cursor in the Find what field and press the space bar, then place your cursor in the Replace with field and type |. Then click Replace or Replace All as you require.
0
Ingeborg Hawighorst (Microsoft MVP / EE MVE)Microsoft MVP ExcelCommented:
OK, here's what you can do in Notepad++:

Select a tab sign and copy it
- Ctrl H to replace all tabs with space
- Ctrl H to replace all spaces with |

this will yield some duplicate || since your data had spaces and tabs next to each other,

Finally Ctrl H to replace all || with |

cheers, teylyn
0
g11mediaAuthor Commented:
i have another one for you regarding find and replace. how do i find and replace carriage return (CR) and/or line feed (LF) in the attached notepad++ (or notepad).

better yet, how do i now have it when i save from excel. i saved this file as a .csv and got rid of "," and replaced with nothing.  expertexchange-linefeed-CR.txt
0
Ingeborg Hawighorst (Microsoft MVP / EE MVE)Microsoft MVP ExcelCommented:
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Excel

From novice to tech pro — start learning today.