My text file has more than ten thousand lines. Each line starts with a word or a phrase followed by a tab and the content, such as:
[line 1] This is the first line. [tab] Here is the content.[end of line]
I want to find character s
in all the words between the beginning of each line and a tab (\t
), and replace it by a pipe (|
) so that the text will look like:
[line 1] Thi| i| the fir|t line. [tab] Here is the content.[end of line]
Here is what I have done:
Search: ^(.*)s+(.*)?\t
Replace: \1|\2\t
It works but the problem is it does not replace s
in one replace. I have to click on Replace All for several times before s
in all the words is replaced.
So it comes to my question: how can I replace all the occurrences of character s
in just one search and replace?
Note that I'm working on TextWrangler but I'm OK with other editors.
Thanks a lot.