Find & Replace 'Returns'
This feature enables you to find and replace 'hard' or 'soft' returns in a Google Doc.
As well as replacing, you can also choose to insert returns before or after found text, without deleting the found text.
I will show you:
How to access this feature.
What it can do.
Some helpful examples that show how the various options work.
See other pages on this website for further information:
How to access this feature...
First, you need to display the sidebar for finding and replacing returns.
You access it from the Multi Find & Replace 'Utilities' menu as shown below:
What it can do...
Find any of the following:
Hard returns
Soft returns
Tabs
Phrases (that are not regular expressions)
Regular expressions
'RE2' regular expression syntax is supported by Multi Find & Replace.
(See RE2 syntax reference HERE).
Replace with (or insert) any of the following:
Hard returns
Soft returns
Nothing
Spaces (The usual choice for removing returns to form a single paragraph.)
Phrases
Find and replace in tables. (Select within table cells, or select one or more whole cells.)
You can also INSERT 'replace' items before or after found text, without deleting the found text.
Some examples...
HINT: Turn on 'Show non-printing characters' from the Docs 'View' menu.
Example 1: REPLACE hard returns with soft returns: (OR soft returns with hard returns!)
NOTE when replacing hard returns:
- Only hard returns BETWEEN selected paragraphs are replaced. The hard return at the end of the last selected paragraph is not affected.
- Empty paragraphs and paragraphs formatted as title or heading will be ignored unless the corresponding options are selected. (See screenshot below.)
- Hard returns BETWEEN a paragraph and a list item cannot be replaced.
- To insert anything before or after a hard return, see the easy method below!
NOTE when replacing hard returns:
- Only hard returns BETWEEN selected paragraphs are replaced. The hard return at the end of the last selected paragraph is not affected.
- Empty paragraphs and paragraphs formatted as title or heading will be ignored unless the corresponding options are selected. (See screenshot below.)
- Hard returns BETWEEN a paragraph and a list item cannot be replaced.
- To insert anything before or after a hard return, see the easy method below!
'Options for replacing hard returns':
1. Include 'title', 'subtitle' or 'heading' text
When the 'return' after a 'title', 'subtitle' or 'heading' type paragraph is replaced, that paragraph is actually merged with the following paragraph to form one new paragraph. The style of the new paragraph will come from the paragraph below the header. So this means the 'title' etc. properties will be lost. To prevent this in a document with headers, leave this box unchecked.
2. Include empty paragraphs.
Often empty paragraphs are meant to give it structure. In that case, leave 'Include empty paragraphs' unchecked, then these will not be affected when replacing hard returns.
Example 2: INSERT hard returns AFTER existing hard returns
To do this, we use the regular expression: .$ which finds the character at the end of the paragraph.
To do this, we use the regular expression: .$ which finds the character at the end of the paragraph.
NOTE: To insert multiple returns, just click 'FIND & INSERT' again.
NOTE: To insert something at the beginning of every paragraph, use the regular expression: ^. and choose 'INSERT BEFORE found text' in step 1.
Example 3: INSERT hard returns BEFORE numbered items in a paragraph:
NOTE: This does NOT refer to auto numbered 'lists' in a Google Doc. In that case the numbers are auto generated and are NOT searchable!
NOTE: This does NOT refer to auto numbered 'lists' in a Google Doc. In that case the numbers are auto generated and are NOT searchable!
USING THE 'FIND' BUTTON:
Use the 'FIND' button to identify all found text first. (See below).
(Then you can select only the parts of the text where you want to replace or insert. For this example, you could select the text AFTER the '1.' at the start to avoid inserting a 'return' before the start of the first paragraph.)
Use the 'FIND' button to identify all found text first. (See below).
(Then you can select only the parts of the text where you want to replace or insert. For this example, you could select the text AFTER the '1.' at the start to avoid inserting a 'return' before the start of the first paragraph.)
Example 4: INSERT soft returns (OR hard returns) AFTER commas:
Have fun! 😀
NOTE: This is a new feature which I must say has been a very big challenge to get it all working . And while I have made every effort to get rid of nasty bugs, there could still be some lurking. So if something doesn't work as expected, please use the support form on this website to tell me about it, in a nice way of course! 😁