On Mon 16-Jun-03 4:58am -0400, Dimka wrote:

> Hey there, Bill McCarthy!

>>> i  receive  messages  that  are  poorly  broken
>>> up  into paragraphs [...]

B>> That's impossible to do reliably without artificial intelligence.
B>> If you think I'm wrong, try writing a rule in plain English
B>> that's detailed enough to write a PCRE macro from it.

> What about this:

> If there's a capital letter in the start of a new-line,
> then insert a new line.

Let's add that the prior line end with a '.' or '?' followed by
optional white space.

> That should work 80% of the time, with silly errors. :)
> This macro would be helpful for me too. Can any one make it?

Here's a starting point (a mod of Januk's work):

----8<--- start w2 -----
%Comment="%ClipBoard"%-
%QInclude="w2sub"%-
%Comment=""%-
----8<---- end w2 ------

----8<---- start w2sub -----
%if:'%Comment'='':'':'%-
%-
%Wrapped=_%SetPattRegExp="(?s-m)^(.*?[.?])(\s*\n([A-Z].*)\s*$|.*\z)"%-
%RegExpBlindMatch="%Comment"%-
%SubPatt="1"_

%Comment=_%SetPattRegExp="(?s-m)^(.*?[.?])(\s*\n([A-Z].*)\s*$|.*\z)"%-
%RegExpBlindMatch="%Comment"%-
%SubPatt="3"_%-
%QInclude="w2sub"'
----8<---- start w2sub -----

-- 
Best regards,
Bill


________________________________________________________

http://www.silverstones.com/thebat/TBUDLInfo.html

Reply via email to