Posted: Thu May 12, 2005 1:32 am Post subject: Replace with a return character
Patrick,
I've downloaded last version of NeoOffice few days ago. I create a new text document in NeoOffice and I tried to replace a character with return or tab character in find and replace dialog. I'm not able to do it: is it really so?
Joined: Sep 08, 2003 Posts: 63 Location: Teesside, UK
Posted: Thu May 12, 2005 2:39 am Post subject:
Hi Jose,
you wrote
Quote:
I create a new text document in NeoOffice and I tried to replace a character with return or tab character in find and replace dialog. I'm not able to do it: is it really so?
In the search and replace dialog, you need to check the regular expressions box. Then you can use \t to mean a tab. Look up regular expressions in the help for a full list of codes.
Joined: Jun 20, 2003 Posts: 104 Location: Birmingham, Alabama; and Amelia (Terni), Italy
Posted: Sun May 15, 2005 3:30 pm Post subject:
Luke wrote:
Hi Jose,
you wrote
Quote:
I create a new text document in NeoOffice and I tried to replace a character with return or tab character in find and replace dialog. I'm not able to do it: is it really so?
In the search and replace dialog, you need to check the regular expressions box. Then you can use \t to mean a tab. Look up regular expressions in the help for a full list of codes.
Luke
I've read all the stuff on regular expressions but cannot find a way to find or replace return characters...maybe because OOo doesn't use them? Maybe line feeds, vertical tabs, or something else instead of a simple CR?
Anyway, I'd sure like to be able to replace any single line break with a space, but can't do it...any ideas? \r is logical, but just replaces it with an "r"!!! Unfortunately, I also can't copy a return and paste it into the Find and Replace dialog. Help! Cheers, _________________ Gib Henry
There's another, older discussion where we sorted this all out a couple of months ago. I don't have it bookmarked, and it's not in the wiki (though perhaps it should be, since it's so obtuse), but if you try searching, you should find it....
Smokey _________________ "[...] whether the duck drinks hot chocolate or coffee is irrelevant." -- ovvldc and sardisson in the NeoWiki
Anyway, I'd sure like to be able to replace any single line break with a space, but can't do it...any ideas? \r is logical, but just replaces it with an "r"!!! Unfortunately, I also can't copy a return and paste it into the Find and Replace dialog. Help! Cheers,
Check the "Regular expressions" checkbox, put "$" in the "Search for" field, and " " in the "Replace with" field.
BTW, "$" is the regular expression symbol for "end of line". "\r" and "\n" are not regular expression symbols but are C programming language symbols which is why they don't work.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You cannot download files in this forum