Ask Your Question

How can I remove all tab key entries at once

I have a large document that was transcribed for me that has paragraph indentions and spaces between each paragraph that were created when the transcriber used the 'tab key' on your keyboard. Is there a way to remove all of these from the document rather than having to go through and delete them all at once?

edit retag close merge delete

3 Answers

Sort by » oldest newest most voted

With Menu/Edit/Find & replace (Ctrl+H):
-In other options mark regular expression.
For tabs
-Search: \t
-Replace: (nothing)
To eliminate blank paragraphs:
-Search: ^\$
-Replace: (nothing)

LibreOffice help, list of regular expression

more

I need to remove around 3000 manual tabs which I had entered in a very large document, and just make use of the Return button to obtain automatic indents. The above answer did not work. Still looking.... OK, I guess clicking select all on my docurment, going to edit, then find and replace, checking "regular expressions" in the dialogue box, entering \t in the find line, and clicking "replace all", did the trick.

more

Comments

The answer you reference does include the advice

-In other options mark regular expression.

( 2019-09-10 06:50:30 +0200 )edit

I needed to remove around 2,200 manual tabs which I had entered in a very large document (an 80,000-word novel), and just make use of the Return button to obtain automatic indents. The above Answer #1, which recommends using a Search code of "\t" failed to work. I subsequently found that the following does work. First, in Edit (or the magnifying glass icon), Select Find and Replace. Search: \b\t Replace: (Nothing) - Replace All. The logic is that "\b" will find a blank field, and "\t" will then locate the actual tab.

more

Comments

Concerning the meaning of \bsee https://www.regular-expressions.info/....
Since tabs are often accompanied either by a left or by a right space or by spaces at both sides or by no spaces at all, and the text at that position should mostly still be split up by a space after the replacement, the following strings used in F&R with RegEx enabled are recommendable if tabs should be removed:
Search: "?\t ?" (Regard the space at the left of that string!)
Replace : "" (A single space.)
Do not enter the double quotation marks.

( 2019-05-10 23:10:54 +0200 )edit

Stats

Asked: 2016-12-06 15:41:30 +0200

Seen: 723 times

Last updated: Sep 10