I need a way to find "-" between 3 or more letters.
Right now I can use Find and Replace
(?<=\w)-(?=\w)
with regular expressions in Find and Replace.
Here is the problem:
This is a scanning thing > In my language, there are plenty of words that look like "n-are" "s-a" "privindu-l"; these are fine to scan, but when there are words split at the end of a page and you get words like "rămâ-nea" in the middle of my text that are not ok.
Using (?<=\w)-(?=\w) I need to ignore a lot of the correct words when replacing.
What I want is to make this "rule of thumb" work -> If a word has at least 3 letters on either side of the "-", then that symbol should be deleted.
[Solved] Find hyphen between 3 or more letters
[Solved] Find hyphen between 3 or more letters
Last edited by clausisme on Thu Jul 17, 2025 12:47 pm, edited 1 time in total.
OpenOffice 4.01 on Windows 7
Re: Finding a character between 3 or more letters
Try
(?<=[:alpha:][:alpha:][:alpha:])-(?=[:alpha:][:alpha:][:alpha:])
(I assume you mean at least 3 characters on both sides, otherwise "privindu-l" would be a match?)
(?<=[:alpha:][:alpha:][:alpha:])-(?=[:alpha:][:alpha:][:alpha:])
(I assume you mean at least 3 characters on both sides, otherwise "privindu-l" would be a match?)
Windows 10, Openoffice 4.1.11, LibreOffice 7.4.0.3 (x64)
Re: Finding a character between 3 or more letters
If the hyphens you don't want are appearing because automatic hyphenation is turned on then you can turn that off.
Windows 10, Openoffice 4.1.11, LibreOffice 7.4.0.3 (x64)
Re: [Solved] Finding a character between 3 or more letters
That worked. Thank you 
OpenOffice 4.01 on Windows 7