NISUS Archives

November 2010

NISUS@LISTSERV.DARTMOUTH.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Reply To:
Date:
Sat, 6 Nov 2010 02:30:22 +0900
Content-Type:
text/plain
Parts/Attachments:
text/plain (33 lines)
On Nov 6, 2010, at 1:18 AM, THDW wrote:

> I am having problems with the end of lines. Sometimes the scan has inserted a bogus end of paragraph in the middle of a sentence.
> 
> Given that all paragraphs must end either with a full stop or with a full stop and an inverted comma - in my text I have just one, non-smart, inverted comma which also serves as apostrophe - as the end of a quote,

Open the Find panel, switch to the PowerFind Pro mode and search for

(?<!\.|\.’)\n

which will find a return (end of line) not preceded by "full stop" (\.) or "full stop and apostrophe" (\.’).


Or perhaps this one would be better:

(?<!\.|\.’|\n)\n

which will find a return not preceded by another "return" (\n) too.


I'm not sure if you mean "’" by "non-smart, inverted comma". If it is another character, modify the expression accordingly.


This cannot be done in the PowerFind mode for which (?<! ...) -- standing for "not preceded by ..." -- is not available, unfortunately.


> I tell myself that it can't be difficult to run a search where the end of the line does not respect these possibilities.

Not difficult for those who are familiar with NWP's PowerFind Pro but the expression(s) above relies on a unique feature of oniguruma, regex library used by NWP. AFAIK other regex engines do not allow an expression matching strings of variable or multiple lengths in (?<! ...) but my knowledge may be outdated.


Kino

ATOM RSS1 RSS2