How to search and replace using wildcard in Linux?

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read how to get help
Post Reply
SamLearnsLinux
Level 2
Level 2
Posts: 75
Joined: Wed Jun 27, 2018 6:13 am

How to search and replace using wildcard in Linux?

Post by SamLearnsLinux » Mon Aug 20, 2018 3:41 pm

How do I use Wildcards for search and replace in Linux either with the text editor or with LibreOffice Writer? Either works for me. Eg
"Hello how are you doing today?",
I want to replace everything between the word 'how' and 'doing'

I tried 'how*doing' but that did not work

gm10
Level 12
Level 12
Posts: 4155
Joined: Thu Jun 21, 2018 5:11 pm

Re: How to search and replace using wildcard in Linux?

Post by gm10 » Mon Aug 20, 2018 4:14 pm

In either of them enable regex search, then e.g.
search: how.*doing
replace: howdoing

SamLearnsLinux
Level 2
Level 2
Posts: 75
Joined: Wed Jun 27, 2018 6:13 am

Re: How to search and replace using wildcard in Linux?

Post by SamLearnsLinux » Tue Aug 21, 2018 12:29 am

gm10 wrote:
Mon Aug 20, 2018 4:14 pm
In either of them enable regex search, then e.g.
search: how.*doing
replace: howdoing
Thank you that worked prefect.

Post Reply

Return to “Newbie Questions”