FM12: Quirks in Find/replace using RegEx (Perl)

Klaus Daube frame at daube.ch
Mon Jul 7 06:48:17 PDT 2014


Friends of FramMaker, please judge.

I want to find incorrectly ended paragraphs (missing punctuation).
For example the following 4 lines are paragraphs, the first 2 correct,
the next two incorrect:

This is the first paragraph!
And this is the second one.
And here a third
And a fourth one:

RegEx Find/Replace with these settings:
Find:  ([^\.!?])\n
Repl:  $1.\n
Result: find is correct, replacement is n instead of paragraph end
With repl = $1.\r        replacement is a forced newline; correct, but not wanted.

Find:  ([^\.!?])(\n)
Repl:  $1.$2
This creates a correct replacement!

IMHO the behaviour of not honoring \n as an 'end of paragraph' for the replacement is 
a bug. Do You agree?

Klaus Daube
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Docu + Design Daube; Schäracher 11; CH-8053 Zürich
Technical documentation & consultancy; On-line and paper
F: +41-44-422 86 25  E: ddd at daube.ch  W: www.daube.ch




More information about the framers mailing list