[Solved] How to remove unwanted optional hyphens?

Discuss the word processor
Post Reply
webstar082
Posts: 5
Joined: Thu Jan 14, 2010 5:00 pm

[Solved] How to remove unwanted optional hyphens?

Post 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.
Last edited by Hagar Delest on Mon Feb 08, 2010 10:28 pm, edited 1 time in total.
Reason: tagged [Solved].
OpenOffice 3.0.1 on Windows XP
User avatar
acknak
Moderator
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: How to remove unwanted optional hyphens?

Post 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.
AOO4/LO5 • Linux • Fedora 23
webstar082
Posts: 5
Joined: Thu Jan 14, 2010 5:00 pm

Re: How to remove unwanted optional hyphens?

Post 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.
OpenOffice 3.0.1 on Windows XP
User avatar
acknak
Moderator
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: How to remove unwanted optional hyphens?

Post 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.
AOO4/LO5 • Linux • Fedora 23
JohnV
Volunteer
Posts: 1585
Joined: Mon Oct 08, 2007 1:32 am
Location: Kentucky, USA

Re: How to remove unwanted optional hyphens?

Post by JohnV »

How about:
F11
Right click the Default paragraph style > Modify > Text Flow tab and uncheck Automatic under Hyphenation.
webstar082
Posts: 5
Joined: Thu Jan 14, 2010 5:00 pm

Re: How to remove unwanted optional hyphens?

Post 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.
OpenOffice 3.0.1 on Windows XP
webstar082
Posts: 5
Joined: Thu Jan 14, 2010 5:00 pm

Re: How to remove unwanted optional hyphens?

Post 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.
OpenOffice 3.0.1 on Windows XP
User avatar
acknak
Moderator
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: How to remove unwanted optional hyphens?

Post by acknak »

Thanks for the follow-up.
AOO4/LO5 • Linux • Fedora 23
msrentpr
Posts: 4
Joined: Sun Feb 07, 2010 8:55 pm

Re: How to remove unwanted optional hyphens?

Post 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.
updated to open office3.1 windows vista
User avatar
acknak
Moderator
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: How to remove unwanted optional hyphens?

Post 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
AOO4/LO5 • Linux • Fedora 23
msrentpr
Posts: 4
Joined: Sun Feb 07, 2010 8:55 pm

Re: How to remove unwanted optional hyphens?

Post 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?
updated to open office3.1 windows vista
User avatar
Hagar Delest
Moderator
Posts: 32627
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: How to remove unwanted optional hyphens?

Post by Hagar Delest »

In the Find & Replace dialog, click the More Options button.
LibreOffice 7.6.2.1 on Xubuntu 23.10 and 7.6.4.1 portable on Windows 10
msrentpr
Posts: 4
Joined: Sun Feb 07, 2010 8:55 pm

Re: How to remove unwanted optional hyphens?

Post 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.
updated to open office3.1 windows vista
User avatar
RoryOF
Moderator
Posts: 34586
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: How to remove unwanted optional hyphens?

Post 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.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
msrentpr
Posts: 4
Joined: Sun Feb 07, 2010 8:55 pm

Re: How to remove unwanted optional hyphens?

Post by msrentpr »

Thank you thank you- what an annoying little icon it was
updated to open office3.1 windows vista
Styler001
Posts: 1
Joined: Mon May 30, 2011 9:21 pm

Re: How to remove unwanted optional hyphens?

Post 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.
OpenOffice 3.1 on Windows 7.
bugmenot111
Posts: 17
Joined: Fri Mar 26, 2010 12:14 pm

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

Post by bugmenot111 »

i'm posting to say that using a search of \x00AD and replace did the trick. thank you SO MUCH.
OpenOffice 3.1 on Windows Vista
DavidMWright
Posts: 36
Joined: Thu May 22, 2014 10:45 am

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

Post 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!
Neo Office 2017.33 on Mac OS10.12.6
User avatar
kabing
Volunteer
Posts: 678
Joined: Fri Nov 23, 2007 12:05 am
Location: Midwest, USA

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

Post 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
NeoOffice (app store version) OpenOffice.org 4.1 and LibreOffice 4.3 on Mac OS X El Capitan
OpenOffice.org 4.1.2 on Windows 10 (Previously on Vista)
swsculli
Posts: 1
Joined: Thu May 07, 2015 5:15 pm

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

Post 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.
Open Office 4.1.1 on windows 7
imberest
Posts: 2
Joined: Wed Jun 10, 2015 7:07 am

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

Post 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.
LibreOffice Version: 4.3.5.2
User avatar
RoryOF
Moderator
Posts: 34586
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

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

Post by RoryOF »

It is better to paste from the Internet using /Edit /Paste Special and selecting "Unformatted text" from the options offered.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
imberest
Posts: 2
Joined: Wed Jun 10, 2015 7:07 am

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

Post 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?
LibreOffice Version: 4.3.5.2
User avatar
RoryOF
Moderator
Posts: 34586
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

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

Post by RoryOF »

Select it, /Edit Cut, then /Edit /Paste special "Unformatted text" to replace it.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
www_MKRD_info
Posts: 3
Joined: Sat Jun 13, 2015 3:35 pm

Re: How to remove unwanted optional hyphens?

Post 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.
LibreOffice Version: 4.4.3.2 on Windows 7 Ultimate x64
http://www.MKRD.info/
Post Reply