Issue 88102 - Regex pattern for paragraph malfunction
Summary: Regex pattern for paragraph malfunction
Alias: None
Product: Writer
Classification: Application
Component: editing (show other issues)
Version: OOo 2.4.0
Hardware: All All
: P3 Trivial with 3 votes (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
Depends on:
Reported: 2008-04-09 14:45 UTC by jvromans
Modified: 2017-05-20 10:44 UTC (History)
5 users (show)

See Also:
Latest Confirmation in: ---
Developer Difficulty: ---


Note You need to log in before you can comment on or make changes to this issue.
Description jvromans 2008-04-09 14:45:04 UTC
There are several bugs in the handling of the matching of paragraph begin and
end, making this facility very crippled.

The docs state that ^ and $ can be used to match begin / end of a paragraph.
However, patterns like foo$bar do not work since nothing is matched beyond $.
Similar ^. 

You can change $ (a lone paragraph mark) into something else, but not foo$ or $foo.

Suggested solution is to provide a special pattern (e.g., \p) that matches the
paragraph mark as an ordinary character.

Note that this is NOT a DUP of 15666.
Comment 1 michael.ruess 2008-04-09 15:05:17 UTC
Reassigned to SBA.
Comment 2 joopb 2008-04-11 09:32:35 UTC
Already in my issue 25177 I wrote that it is not possible to find and replace a
line-end (shift-enter) with a paragraph-end (enter) and the other way around.
Now only the first option is possible not from paragraph-end (enter) to line-end

As written in this issue (88102) it is not possible to use the paragraph-end $
in a search string with other strings (i.e. words) before _and_ after the

It is still not possible to search and replace with page-end (ctrl-enter).

Other wordprocessor programs do have these possibilities (one of the reasons
that I still have an old copy of such a program on one of my computers !
Comment 3 cno 2008-04-21 07:38:01 UTC
This item comes down to the possibility to to work in more than one paragraph
with one regex search/replace.
-> set to enhancement
This is alread covered by the 'meta-issue' 46165.
However, it is IMO the most asked improvement. And maybe (?) relatively easy to
fix, so that it doesn't have to wait on the other rework ?
-> set to new
Comment 4 jvromans 2008-05-08 18:25:05 UTC
May I kindly suggest PCRE?
Comment 5 cno 2008-07-15 12:22:54 UTC
another RegEx for you, ama
Comment 6 andreas.martens 2009-07-08 13:51:15 UTC
ama: I fear that there is no easy way to fix this because our internal paragraph
representation is not a long string with paragraph ends. It's an array of
strings (for each paragraph one string).
Comment 7 nicklevinson 2009-10-10 18:38:38 UTC
Would this be a workable approach for the next OOo version that requires that
old documents be upgraded? Add a string to the end of each paragraph in the
array, the string (perhaps 1-2 characters long) to be defined as an
end-of-paragraph mark. The string would be inserted by OOo and would not be
displayed or printed. Then regex handling could accommodate this, too.

I assume this should wait for the next upgrade that requires docs to be upgraded
for compatibility or else users' docs might have the string already with an
intent that it be seen and their string would then disappear without notice, so
explicit upgrading of docs is needed to protect users' data.

Or, perhaps, paragraphs in the array could be counted and thereby each one
identified, and the consecutive paragraph IDs used to support an enhanced regex.
The user wouldn't have to see the IDs. I don't think this would require
upgrading any docs.

Bug 105750 is also relevant. My comment is based on OOo 3.0.0 OOO300m9 (Build
9358), on Fedora 10 Linux (this bug reporting form doesn't seem to allow me to
update certain fields).


Comment 8 MULTIVAC 2014-05-05 18:25:25 UTC
This is getting to be a make-or-break issue for me. It's a major bug, that makes OpenOffice useless for editing large files. Not being able to find/replace across paragraphs severely limits my ability to do practical work.
Comment 9 Marcus 2017-05-20 10:44:27 UTC
Reset the assignee to the default "".