Page 1 of 1

[Solved] How to remove unwanted optional hyphens?

Posted: Sun Jan 24, 2010 9:31 pm
by webstar082
Hello,
I got a text with a bunch of optional hyphens in it.
(you know, those hyphens with zero length between two letters that only create a visible hyphen if the word appears at the end of a line)

The problem is: I want to get rid of this nasty stuff completely.
That is, I want to remove ALL of those "optional hyphens" in the text.
How can I do this?
Is there a regular expression for an optional hyphen that I could use in the find and replace dialog? (I can't find anything)

Thanks in advance.

Re: How to remove unwanted optional hyphens?

Posted: Sun Jan 24, 2010 10:45 pm
by acknak
You can copy/paste one of the soft hyphens into the Find & Replace "Search for" field, or you can set "Options/Regular expressions: ON" and enter \x00AD in place of the soft hyphen.

Re: How to remove unwanted optional hyphens?

Posted: Sun Jan 24, 2010 11:41 pm
by webstar082
Hi,
if I could copy those optional hyphens I'd surely not post here.
It's not possible to copy them because they have zero length. They are visible "behind" the actual characters.
But the regular expression worked. Thanks.

Re: How to remove unwanted optional hyphens?

Posted: Mon Jan 25, 2010 5:30 am
by acknak
It's not possible to copy them because they have zero length.
If it wasn't possible, I wouldn't have suggested it. ;-)

I assume you mean that it's not possible to copy them because you can't select them--is that right?

You can select them, you just have to be a little creative. Here are two methods that work for me:
  • Select & copy some characters on either side, paste into the dialog, then delete the extra characters. For me, the soft hyphen is visible in the dialog.
  • Use the cursor keys instead of the mouse: move to the position before the character before the hyphen, then use the right arrow key to move one position to the right (i.e. before the soft hyphen). Then hold Shift and arrow one more step to the right. That will select one character, the soft hyphen. Copy/paste into the dialog.

Re: How to remove unwanted optional hyphens?

Posted: Mon Jan 25, 2010 7:33 pm
by JohnV
How about:
F11
Right click the Default paragraph style > Modify > Text Flow tab and uncheck Automatic under Hyphenation.

Re: How to remove unwanted optional hyphens?

Posted: Thu Feb 04, 2010 6:13 am
by webstar082
acknak wrote:You can select them, you just have to be a little creative. Here are two methods that work for me:
  • Select & copy some characters on either side, paste into the dialog, then delete the extra characters. For me, the soft hyphen is visible in the dialog.
  • Use the cursor keys instead of the mouse: move to the position before the character before the hyphen, then use the right arrow key to move one position to the right (i.e. before the soft hyphen). Then hold Shift and arrow one more step to the right. That will select one character, the soft hyphen. Copy/paste into the dialog.
I can assure you, I tried both of those methods *before* posting here and both of them clearly DO NOT work.
You can copy a hyphen with both of those methods, yes.
But I don't need to copy a hyphen in the first place. I can easily *type* a hyphen using my keyboard.

This whole issue is about "optional hyphens" and only about "optional hyphens."
They clearly cannot be copied using those 2 methods. They cannot be copied at all. That was my problem.
The only way to solve it was to type in the regular expression value directly.

Re: How to remove unwanted optional hyphens?

Posted: Thu Feb 04, 2010 6:15 am
by webstar082
JohnV wrote:How about:
F11
Right click the Default paragraph style > Modify > Text Flow tab and uncheck Automatic under Hyphenation.
If you read my first post you'll see that I wrote something about having an already existing text.
Your suggestion has nothing to do with that.

Re: How to remove unwanted optional hyphens?

Posted: Thu Feb 04, 2010 6:30 pm
by acknak
Thanks for the follow-up.

Re: How to remove unwanted optional hyphens?

Posted: Sun Feb 07, 2010 9:11 pm
by msrentpr
I have been unsuccessfully trying to remove these --- unwanted hyphens. I tried putting in several letters--several letters, copying and pasting them into find and replace, then deleting the letters. It said it found those unwanted hyphens and I thought I just put in a space to replace it but they stayed.

I also tried right clicking, clicking on paragraph, clicking on text flow, but the automatic hyphenation is supposedly already off and nothing I did, checking it then unchecking it did any good.

I didn't have this problem until I did an update this morning. Is there any way to go back to a prior version that didn't have this issue? It seems to be a problem with this version. I'm so frustrated I want to cry and scream at the company, but can't even find a way to contact them.

Re: How to remove unwanted optional hyphens?

Posted: Sun Feb 07, 2010 9:42 pm
by acknak
From the report above, it seems that you can't reliably copy/paste the option hyphens when running OOo under Windows.

You should be able to use the regular expression method described above: http://user.services.openoffice.org/en/ ... 82#p121982

Re: How to remove unwanted optional hyphens?

Posted: Sun Feb 07, 2010 10:47 pm
by msrentpr
But how do you get to the "Regular expression"? I couldn't find it under tools, options in any of the listings on the left side even when I clicked on them. I even searched for that before the first post. Is it just me?

Re: How to remove unwanted optional hyphens?

Posted: Sun Feb 07, 2010 10:49 pm
by Hagar Delest
In the Find & Replace dialog, click the More Options button.

Re: How to remove unwanted optional hyphens?

Posted: Mon Feb 08, 2010 1:22 am
by msrentpr
I've tried following all of the directions for getting rid of hyphens between every word that I type and all to no avail so I am just going to delete openoffice completely. This was never an issue with the previous version. But thanks for your help.

Re: How to remove unwanted optional hyphens?

Posted: Mon Feb 08, 2010 1:33 am
by RoryOF
Are you seeing hyphens - or little dots? If little dots between every word you type, press the button on the toolbar that looks like a backwards P and turn off the display of Nonprinting Characters.

Re: How to remove unwanted optional hyphens?

Posted: Mon Feb 08, 2010 2:38 am
by msrentpr
Thank you thank you- what an annoying little icon it was

Re: How to remove unwanted optional hyphens?

Posted: Mon May 30, 2011 9:45 pm
by Styler001
acknak wrote:
It's not possible to copy them because they have zero length.
If it wasn't possible, I wouldn't have suggested it. ;-)

I assume you mean that it's not possible to copy them because you can't select them--is that right?

You can select them, you just have to be a little creative. Here are two methods that work for me:
  • Select & copy some characters on either side, paste into the dialog, then delete the extra characters. For me, the soft hyphen is visible in the dialog.
Although I'm not currently using OO (I'm using Word at this time since I got a good deal on a license from my work), this tip did work for me, so I thought I would post it in case anyone else is looking for the same solution for Word (and maybe this just might clear up some confusion here).

I had the same problem with the soft hyphen not being able to be selected to do a search on. One of my words was "awak-ening".

1. Select the whole word and paste it into a find-replace.
2. While at the end of the word, backspace over "gnine". DON'T GO ANY FARTHER THAN THAT!
3. Then position to the beginning and delete "awak". Again, don't go any farther than that.
4. At this point, your "invisible hyphen" is all that is remaining in the "find" box.
5. Now just enter anything into the "replace" box that you know is not in the document. I used ***.
6. Click "Replace All" and all of your soft hyphens are replaced with ***.
7. Now just replace all of the *** with nothing and your text is all cleaned up.

Sorry if this isn't appropriate here, but I wasn't able to quickly find any help on Word forums for this and my Google also showed this topic which provided the answer I needed immediately.

Re: [Solved] How to remove unwanted optional hyphens?

Posted: Mon Sep 05, 2011 3:26 pm
by bugmenot111
i'm posting to say that using a search of \x00AD and replace did the trick. thank you SO MUCH.

Re: [Solved] How to remove unwanted optional hyphens?

Posted: Wed Nov 05, 2014 1:22 pm
by DavidMWright
I had this same problem with NeoOffice (the Mac version of OO). I finally got around it by cutting the paragraph containing the unwanted hyphen, then using Paste Special > Formatted text [RTF] to paste it back in again. Oddly, specifying Unformatted text didn't work!

Re: [Solved] How to remove unwanted optional hyphens?

Posted: Sun Dec 21, 2014 2:21 pm
by kabing
I know this is an old thread, but it was a top hit when I searched Google for this issue, so I wanted to post what worked for me.

John V's suggestion:
F11
Right click the Default paragraph style > Modify > Text Flow tab and uncheck Automatic under Hyphenation.
Gave me the clue, and it does work, with a couple of caveats:

-First, you have to modify the style that is being used on the text in question. If you don't use styles regularly, that's likely to be Default, but may not be if the document originated with someone else. If you open the Styles palette (which is what F11 does--although on Macs that key is used for other things), then click in the offending paragraph, the style used for that paragraph will be highlighted. (make sure you have the paragraph icon selected in the styles palette first)

-Second, if you have applied other formatting "manually" (e.g. without using a style) to the paragraph, the hyphenation change may not appear in your text. If this is the case, you can select the paragraphs in question, then go to the Format menu and chose "Default Formatting" BUT this will remove all the other formatting changes you made that are contrary to the chosen style. (Thus using styles and not manual formatting is usually better)


If you don't want to mess with styles, there's another way to remove hyphenation:
-select the paragraphs in questions
-go to the Format menu and choose Paragraph... (or right click/control click in your selection and choose Paragraph... from the contextual menu)
-Go to the Text Flow tab, and unclick "Automatically" under Hyphenation.

kabing

Re: [Solved] How to remove unwanted optional hyphens?

Posted: Thu May 07, 2015 5:33 pm
by swsculli
I find the simplest way to remove these hyphens is to open the doc in Libre text and then highlight, find and replace. I find that Libre will sometimes fix a problem that OO cannot.

Re: [Solved] How to remove unwanted optional hyphens?

Posted: Wed Jun 10, 2015 7:12 am
by imberest
Hi, i found more effective way to clean grey background of copied text. Its working on LibreOffice and someone could try on other editors.

* Select text you want to remove grey background
* Right click > Paragraph > Background
* And here select white color as background

I know that there is fast background selection, but for some reason it does not do the job.

Re: [Solved] How to remove unwanted optional hyphens?

Posted: Wed Jun 10, 2015 8:36 am
by RoryOF
It is better to paste from the Internet using /Edit /Paste Special and selecting "Unformatted text" from the options offered.

Re: [Solved] How to remove unwanted optional hyphens?

Posted: Wed Jun 10, 2015 8:38 am
by imberest
It is better to paste from the Internet using /Edit /Paste Special and selecting "Unformatted text" from the options offered.
I agree, but if you have text in editor with grey background already?

Re: [Solved] How to remove unwanted optional hyphens?

Posted: Wed Jun 10, 2015 8:40 am
by RoryOF
Select it, /Edit Cut, then /Edit /Paste special "Unformatted text" to replace it.

Re: How to remove unwanted optional hyphens?

Posted: Sat Aug 04, 2018 9:42 pm
by www_MKRD_info
acknak wrote:
It's not possible to copy them because they have zero length.
You can select them, you just have to be a little creative. Here are two methods that work for me:
  • Select & copy some characters on either side, paste into the dialog, then delete the extra characters. For me, the soft hyphen is visible in the dialog.
  • Use the cursor keys instead of the mouse: move to the position before the character before the hyphen, then use the right arrow key to move one position to the right (i.e. before the soft hyphen). Then hold Shift and arrow one more step to the right. That will select one character, the soft hyphen. Copy/paste into the dialog.
For some reason the Regular Expression DID NOT work for me.

But I assure readers that the copy - paste into Search&Replace - remove all but the soft hyphen character - Replace with blank method DID work but as you were warned REQUIRES YOU TO BE CLEVER AND IS TRICKY. So, copy several text characters around the soft hyphen, then paste this into Search&Replace dialog. Now you will need to slowly cursor left and right in that string, deleting characters until one of them starts to "highlight" as grey. Bingo! that is your soft hyphen. If REPLACE does not work it is because you have space next to the hyphen. Carefully keep deleting characters to left or right of the shaded space in the Find: text field, then hit REPLACE.

Frankly I think that CTRL+- bind to soft hyphen is stupid because web browsers teach us that should be ZOOM OUT. So delete that key combo to prevent from getting yourself into trouble with your quick fingers.