Hi, Fred.

Hmmm ... I understand your point, but am not sure I would entirely agree with 
the reasoning.

Yes, FrameMaker (and other programs like Word) do put in additional information 
besides the EOP glyph itself.

But, this is a relatively commonly used/desired function - certainly in simple 
text editors - to replace an EOP with other characters (perhaps including an 
EOP). For example, to "join" multiple lines together, or to do what Klaus 
mentions.

Yes, FM is not just a simple text editor, which is why I see your reasoning to 
not call it a bug.

But I think it would be good to define exactly what regular expression matching 
is supposed to do with EOP markers then (or have a special mechanism to 
identify and use an EOP more effectively perhaps?)

Z

From: [email protected] 
[mailto:[email protected]] On Behalf Of Fred Ridder
Sent: Monday, July 07, 2014 8:02 AM
To: [email protected]; [email protected]
Subject: RE: FM12: Quirks in Find/replace using RegEx (Perl)

No, I don't think it is a bug.
And end-of-paragraph mark is not a simple glyph; it has properties and 
attributes associated with it (e.g. a paragraph tag, the formatting associated 
with that paragraph tag, and any overrides to the standard formatting for the 
tag).
You can find an EOP as if it were a simple glyph because they do have a common 
fundamental property (i.e. denoting the end of a paragraph).
But you cannot effectively insert a new EOP in a replace string because there 
is no way to associate any of the other properties with the new mark.
Finding an EOP and replacing it with itself, on the other hand, is a valid 
operation because the found mark has a full complement of paragraph properties.

-Fred Ridder
> From: [email protected]<mailto:[email protected]>
> To: [email protected]<mailto:[email protected]>
> Date: Mon, 7 Jul 2014 15:48:17 +0200
> Subject: FM12: Quirks in Find/replace using RegEx (Perl)
>
> 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
_______________________________________________


You are currently subscribed to framers as [email protected].

Send list messages to [email protected].

To unsubscribe send a blank email to
[email protected]
or visit 
http://lists.frameusers.com/mailman/options/framers/archive%40mail-archive.com

Send administrative questions to [email protected]. Visit
http://www.frameusers.com/ for more resources and info.

Reply via email to