Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I love LibreOffice / OpenOffice, but some tasks we cannot do in it, like mentioned in this question title: search and replace special characters in Writer. Someone does know how to do that?

You can do that tasks in MS Word (for instance, search for "^p", that is paragraph mark, and replace it with "^t", tabulation).

Also, you can do that also in Notepad++ (in showed example, using "\n" and "\t").

But in Writer, although there is a option "regular expressions", I cannot search for special characters with it - I always have to copy+paste text to MS Word/Notepad++, do what I want and copy+paste back to Writer...

Edit #1:

With tabulation mark it functions searching for \t.

What about with paragraph marks or line breaks? It does not. I've already tried \r, \n, \r\n, \n\r, ^p, ^l...

Edit #2: Almost solved by @Linker3000, but what about paragraph marks?

share|improve this question
1  
The $ sign will search for a paragraph mark, but not replace with one. –  user114967 Jan 23 '12 at 20:40

3 Answers 3

up vote 5 down vote accepted

You can certainly use regular expressions in LibreOffice 3.4 as I have just tried it:

enter image description here

There's a fuller list of what can and can't be used here:

http://help.libreoffice.org/Common/List_of_Regular_Expressions

Edit: There's some comments on how to deal with paragraph marks here:

http://www.oooninja.com/2007/12/example-regular-expressions-for-writer.html

share|improve this answer
    
but what about paragraphs, line breaks...? –  kokbira Jun 17 '11 at 14:18
    
Try the regex expressions like \n –  Linker3000 Jun 17 '11 at 18:45
    
With tabulation mark functions, but paragraph or line breaks it does not. I've already tried \r, \n, \r\n, \n\r, ^p, ^l... –  kokbira Jun 17 '11 at 18:54
    
    
I.e., it is impossible to do a single search for paragraph marks :( You can search for line breaks "shift+enter" (or a <br> in html) with "\n". You can search for a text in a beginning of a paragraph, like "^thing" will search for a text "thing" that is in beginning of a paragraph. But paragraph mark no! :( Think that: I have a long text and I want to change all occurrences of "two enters" (not "shift-enter") with "one enter" (not "shift-enter"). How to do that? In MS Word, it's only replace of "^p^p" with "^p"... –  kokbira Jun 17 '11 at 20:25

Even better (in my opinion) to do it with AltSearch. See this post. In the GUI of AltSearch You'll easily find codes all the non-printing chars and much more.

share|improve this answer
    
Are there any official download link? How to use it? –  kokbira Apr 22 '13 at 12:43
    
It looks like got renamed to Alternative dialog Find & Replace for Writer. Ages ago I used to code regular expressons in ~/.config/libreoffice/3/user/config/AltSearchScript.txt (I'm on linux) -- then I would assign them hotkeys using AltSearch GUI. I coded quite a number of text tranformations this way. Which exactly do You need? –  Adobe Apr 22 '13 at 21:13
    
Only an effective way to replace tabulation marks with paragraph marks and vice-versa... E.g., I use that to transform some data organized in lines to spreadsheets. Currently, I use more than one application to do that if using Libre Office / Open Office. With MS Office it is so easy - on Word: 1) replace all ^p^p with ^l, 2) replace all ^p with ^t, 3) replace all ^l with ^p, 4) ctrl+a, ctrl+c; On Excel: 1) ctrl+v... –  kokbira Apr 23 '13 at 12:30
    
I would suggest posting sample data: how it looks like after Ctrl-v. Then how You'd like to be -- after transformation. I'm sure it is possible with altsearch. It also might be possible with default LibreOffice find-replace. Please start a question and give a link here. –  Adobe Apr 23 '13 at 13:05

Try this extension: Alternative dialog Find & Replace for Writer

share|improve this answer
1  
Add a bit of detail, please. –  vonbrand Apr 20 '13 at 14:28
    
I installed that extension, but how to use it? –  kokbira Apr 22 '13 at 12:38
    
Hmmm... The same suggestion as @Adobe? –  kokbira Apr 22 '13 at 12:42

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.