| View previous topic :: View next topic |
| Author |
Message |
Weatherlawyer OOo Enthusiast

Joined: 28 Feb 2006 Posts: 154 Location: England
|
Posted: Wed May 14, 2008 1:31 pm Post subject: Find and replace |
|
|
So why doesn't the dollar sign work as a regular expression in the Replace With box?
Maybe I am missing some carefully crafted code here but WTF? |
|
| Back to top |
|
 |
floris_v Moderator


Joined: 12 Jul 2007 Posts: 4601 Location: Netherlands
|
Posted: Wed May 14, 2008 2:00 pm Post subject: |
|
|
It doesn't work in the Replace by box, as you can find in the Help that comes with the program. You can't replace across paragraphs. I suppose that's intentional. _________________ LibreOffice 3.6.3; OOo 3.4.1 on Windows Vista
Join the Official community forum - in several languages, including Nederlandstalig forum |
|
| Back to top |
|
 |
JohnV Administrator

Joined: 07 Mar 2003 Posts: 8979 Location: Lexinton, Kentucky, USA
|
Posted: Wed May 14, 2008 3:09 pm Post subject: |
|
|
| I can't answer the why question but \n means a paragraph break in the Replace box. |
|
| Back to top |
|
 |
Weatherlawyer OOo Enthusiast

Joined: 28 Feb 2006 Posts: 154 Location: England
|
Posted: Wed May 14, 2008 5:44 pm Post subject: |
|
|
| JohnV wrote: | | I can't answer the why question but \n means a paragraph break in the Replace box. |
No. That's a line break, is it not?
Of course if you publish the whole article to Google groups or somewhere like it, you can copy it from there and that will give you the paragraph spaces in line breaks.
A bit of a long winded way of doing things and not exactly the smartest thing you can do with a document you are working on but a workaround I suppose.
I'll give it a go though. Thanks.
.........................................
Cockamamie way of doing things. I hope they do something about regular expressions for version 3. It's a nightmare.
OK it did work.
So what is the regular expression for line break in the "replace with" box in find and replace? Or to put it another way why bother with the twopenny-halfpenny dollar when the line break function is adequate? |
|
| Back to top |
|
 |
floris_v Moderator


Joined: 12 Jul 2007 Posts: 4601 Location: Netherlands
|
Posted: Wed May 14, 2008 10:48 pm Post subject: |
|
|
It's worse than what you're saying. IN the Search box \n means line break; in the Replace box it's a paragraph break. It's fully documented, and therefore intentional, but bless me if I know why they did it like this. _________________ LibreOffice 3.6.3; OOo 3.4.1 on Windows Vista
Join the Official community forum - in several languages, including Nederlandstalig forum |
|
| Back to top |
|
 |
JohnV Administrator

Joined: 07 Mar 2003 Posts: 8979 Location: Lexinton, Kentucky, USA
|
Posted: Thu May 15, 2008 5:22 am Post subject: |
|
|
And there is no regex for a line break in the Replace box.  |
|
| Back to top |
|
 |
ftack Moderator


Joined: 27 Jan 2003 Posts: 3102 Location: Belgium
|
Posted: Sat May 17, 2008 4:47 am Post subject: |
|
|
The "why" is that certain regex symbols do not represent a character. They represent a "property". Thus, "Office$" means the string "Office" at the end of a paragraph. "^This" is a "This" at the start of a paragraph.
Why is it all so difficult? that is another why, but one I can not answer  _________________ --
GNU/Linux (Ubuntu) |
|
| Back to top |
|
 |
Gudmund General User

Joined: 30 Nov 2005 Posts: 5
|
|
| Back to top |
|
 |
|