Issue 93890

Summary: optional hyphen is not found in regexp mode
Product: Writer Reporter: macias <bluedzins>
Component: editingAssignee: AOO issues mailing list <issues>
Status: CONFIRMED --- QA Contact:
Severity: Normal    
Priority: P3 CC: elish, issues, npolyudova, tombil
Version: OOO300m4   
Target Milestone: ---   
Hardware: PC   
OS: All   
Issue Type: DEFECT Latest Confirmation in: 4.1.0-dev
Developer Difficulty: ---

Description macias 2008-09-14 21:09:57 UTC
Find&replace: to find -- optional hyphen

When you turn regexp on, OOW won't find any match. I don't know any workaround 
for this.
Comment 1 michael.ruess 2008-09-15 09:57:12 UTC
Reassigned to SBA.
Comment 2 nadejda 2009-04-21 17:41:34 UTC
I reprodused this issue in OOO310m9, Window HP. There is no problem. Hyphen (--
) is found in regular expressions mode.
Comment 3 natalia_hitekschool 2009-04-22 20:10:24 UTC
It's not clear what were the steps to reproduce. I couldn't find a problem on 
OOo310m9, Windows Vista, for these steps:
1. Create a new Writer document
2. Input some text with "--" in the couple of places
3. Select the first "--" symbol and click Ctrl+F - the en dash is in the Search 
For field
4. Click on the document to remove of its selection 
5. Click Find - the en dash is found
6. Click once more - the second one is found
7. Click More Options and chose Regular Expression and repeate the search - 
both are found

The same is for search for the special character "--"(General Punctuation 
U+2013)
The same is for search for the Regular Expression \x2013
Comment 4 macias 2009-04-22 20:43:02 UTC
Thank you for you comments but this report is not about en-dash or hyphen, but 
it is about optional hyphen -- hyphen that shows up when line breaks.
Comment 5 natalia_hitekschool 2009-04-22 21:03:02 UTC
It's still unclear what exactly you did.

I checked for soft hyphen which is not --, but Ctrl+"-"
1. F&R dialog -> uncheck Regular Expression -> Search for Ctrl+"-" - soft 
hyphen is found
2. F&R dialog -> uncheck Regular Expression -> Search for Special Character 
U+00AD(173)- soft hyphen is found
3. F&R dialog -> check Regular Expression -> Search for \x173- soft hyphen IS 
NOT found
 
Really, the Soft hyphen can't be found using Regular Expression
Comment 6 macias 2009-04-22 22:18:06 UTC
I did (1) but please note I tested this on previous version of OOW.
Comment 7 natalia_hitekschool 2009-04-22 22:26:09 UTC
Natalia_Hitekschool -> SBA
The Soft hyphen can't be found using Regular Expression, see my steps for soft 
hyphen Ctrl+"-"
Comment 8 tombil 2013-04-09 20:57:10 UTC
(In reply to comment #5)

> 3. F&R dialog -> check Regular Expression -> Search for \x173- soft hyphen
> IS 
> NOT found

3. F&R dialog -> check Regular Expression -> Search for \xAD or \u00AD or \x{00AD} or Ctrl+V from clipboard - after more then 4 years, the same result - soft hyphen IS NOT found.  (Windows XP all last LO, Aoo)
  
Really, the Soft hyphen can't be found using Regular Expression.
Comment 9 Edwin Sharp 2014-03-31 18:15:45 UTC
No regular expression for optional hyphen.
AOO410m14(Build:9760)  -  Rev. 1582709
2014-03-30_04:11:07 - Rev. 1583103
Debian
Comment 10 tombil 2014-03-31 19:31:52 UTC
"Status: RESOLVED NOT_AN_ISSUE"

How is it that this is not a issue?
UTF char \ u00AD must not be found using reg exp???
Where is it defined?
Comment 11 Edwin Sharp 2014-03-31 19:41:35 UTC
(In reply to tombil from comment #10)
> "Status: RESOLVED NOT_AN_ISSUE"
> 
> How is it that this is not a issue?
> UTF char \ u00AD must not be found using reg exp???
> Where is it defined?

According AOO help, search for optional hyphen is not defined.
In what OpenOffice version such a search was successful?
Comment 12 tombil 2014-03-31 20:06:07 UTC
> According AOO help, search for optional hyphen is not defined.
Help - Find & Replace - List of Regular Expressions -> table:
...
\xXXXX
Represents a special character based on its four-digit hexadecimal code (XXXX).
The code for the special character depends on the font used. You can view the codes by choosing Insert - Special Character.

\xXXXX is probably bug (not updated), now it has to be properly \hXXXX
See too https://issues.apache.org/ooo/show_bug.cgi?id=119375


> In what OpenOffice version such a search was successful?
Approx to version OOo v 3.2  it work
Comment 13 Edwin Sharp 2014-04-01 09:47:31 UTC
reopened
Comment 14 Edwin Sharp 2014-04-01 09:53:39 UTC
Confirmed with
AOO410m14(Build:9760)  -  Rev. 1582709
Rev.1582709
Win 7
Comment 15 Edwin Sharp 2014-04-01 10:36:39 UTC
Not working in OpenOffice.org 3.0.1
Comment 16 tombil 2014-04-01 14:51:01 UTC
Not working too in:
OOo 2.2.1
LibreOf. 4.0.2.2

Working too in:
OOo 2.3.1
OOo 3.2
LibreOf.: 3.3.2,  4.1.4.2,  4.2.2.1

Sorry, in my comment #12 I have stated incorrectly  ...\hXXXX
correctly should be: ...\uXXXX