Apache OpenOffice (AOO) Bugzilla – Full Text Issue Listing |
Summary: | Find and Replace: Subexpression fails for some regular expressions | ||
---|---|---|---|
Product: | Writer | Reporter: | Joe Smith <jes> |
Component: | ui | Assignee: | AOO issues mailing list <issues> |
Status: | CLOSED FIXED | QA Contact: | |
Severity: | Trivial | ||
Priority: | P3 | CC: | issues, jacob |
Version: | OOo 2.4.0 | ||
Target Milestone: | --- | ||
Hardware: | All | ||
OS: | Linux, all | ||
Issue Type: | DEFECT | Latest Confirmation in: | --- |
Developer Difficulty: | --- |
Description
Joe Smith
2008-05-27 15:45:48 UTC
Reassigned to SBA. Confirmed. Reassigned to AMA. I found the problem with this regular expression: \<([^ ]+)[ ]+\1\> I can use it to successfully find duplicated words without "false alarms" like "he heard". In the text: He heard the the bell the expression find "the the", but instead of He heard the bell using $1 in "Replace with" gives me He heard $1 bell "\>" regular expression pattern in "Search for" blocks "$n" and "&" patterns in "Replace with". For ex., try to add leading zero to #.## numbers: 1) less accurate, search: "\<[0-9]\.[0-9]{2}", replace: "0&" or "0$0" "1.11" --> "01.11", it's Ok. 2) more accurate, search: "\<[0-9]\.[0-9]{2}\>", replace: "0&" or "0$0" "1.11" --> "0&" (or "0$0"), WRONG CASE, replace pattern inserts literally Calc has no this error, both patterns works as documented. Tested on OOo-dev 3.2.0 DEV300_m53 Build:9412 on winxp.pro.sp3. Tested in 3.3.0 dev build 9514 and still around. Still around in 3.3.0 RC 9. This issue can be closed: the new regex engine included with AOO 3.4 fixes this problem. Setting RESOLVED/FIXED |