All:
Is there a way to insert line breaks, using Search and Replace? If so, how?
jonathon
All:
Is there a way to insert line breaks, using Search and Replace? If so, how?
jonathon
Try this:
o Enter a line break into your document.
o Copy or cut it.
o Use Find & Replace to find the occurrences you want to replace, but using Find All (and ignoring the "Replace with" field).
o Paste.
I trust this helps.
Brian Barker
All:
Is there a way to insert line breaks, using Search and Replace? If so,
how?
Line breaks (Shift-Enter) or paragraph breaks (just Enter)?
You can search ($) and replace (\n) paragraph breaks with regular
expressions. You can search for line breaks too (\n... yes, I know it is
confusing), but AFAIK there is no way to insert line breaks with the search
and replace tool.
Regards,
Ricardo
Hello,
You can substitute any string of characters for a paragraph mark (the
result of hitting the "Return" key on your keyboard). To do so, you
must enable regular expressions on the Search & Replace panel (open the
additional options) and then you set the replace string to "\n"
(without the quotes). If you want to insert a real line break (the
result of hitting "Shift Return" on your keyboard), you must use the
AltSearch extension available from https://extensions.libreoffice.org/e
xtensions/alternative-dialog-find-replace-for-writer. This will allow
you to perform all sorts of substitutions of that nature fairly easily.
I hope this helps.
Rémy Gauthier.
All:
> Is there a way to insert line breaks, using Search and Replace? If
so, how?
Actually, it is possible by using the extension "alternative searching". I
got version 1.4.2 installed.
Tools -> Extension manager... -> Get more extensions online....
Just insert \p in the replace field for a paragraph break or \n for a line
break.
This extension is also good for searching for the contents of a hyperlink
(the target link, not the visible text) and cross references.
Thanks for making me aware of this extension, Remy
Philip
Can you replace the "\n" with a specific text and then have the "\n"? That would save a bunch of work on a project. I do not want to create a utility to do something like that.
Hi,
Not 100% sure I understand what you mean. Using AltSearch, this is
easily done. Using Search&Replace in Writer, it is a bit more tricky
because searching "\n" looks for end of line (Shift Return), while in
the replacement portion, it substitutes for end of paragraph (Return)
(at least this is what my version of Writer does [LO 5.3.4.2].
Rémy.
> Can you replace the "\n" with a specific text and then have the
"\n"?
> That would save a bunch of work on a project. I do not want to
create a
utility to do something like that.
> Hello,
>
> > > You can substitute any string of characters for a paragraph mark
(the
> > > result of hitting the "Return" key on your keyboard). To do so,
you
> > > must enable regular expressions on the Search & Replace panel (open
the
> additional options) and then you set the replace string to "\n"
> (without the quotes). If you want to insert a real line break (the
> > > result of hitting "Shift Return" on your keyboard), you must use
the
> > > AltSearch extension available from https://extensions.libreoffice.o
rg/e
> > > xtensions/alternative-dialog-find-replace-for-writer. This will
allow
> > > you to perform all sorts of substitutions of that nature fairly
easily.
>
> I hope this helps.
>
> Rémy Gauthier.
> > All:
> >
> > > > > > > Is there a way to insert line breaks, using Search and
Replace? If
you must use the AltSearch extension
I was under the impression that the built-in Search and Replace function
had finally caught up with the Alt-Search extension such that installing
the latter would duplicate existing functionality. Having tried your
recommendation, I discover that my impression is wrong.
you to perform all sorts of substitutions of that nature fairly easily.
If you need to use Regex in LibO, you need to install the Alt-Search
extension.
jonathon
Not so. See 'Find and Replace' > Other Options > Regular expressions
Philip
That doesn't insert line breaks, or paragraph breaks.
Alt-Search does insert line breaks, or paragraph breaks.
jonathon
It would be great if AltSearch could be integrated in LO. This extension
seem to be implemented as a macro today and is dreadfully slow.