clean up on selected text

Get help using and writing Nisus Writer Pro macros.
Post Reply
lellius
Posts: 40
Joined: 2002-08-15 22:06:44

clean up on selected text

Post by lellius » 2008-01-28 06:31:45

I have this macro to clean up text


Find and Replace ‘([,;:\!\?])\1+’, ‘\1’, ‘aE’
Find and Replace ‘^\s*[,.;:\!\?]+‘, ‘’, ‘aE’
Find and Replace ‘(\(|\[) +’, ‘\1’, ‘aE’
Find and Replace ‘ +(\)|\])’, ‘\1’, ‘aE’
Find and Replace ‘(\(|\[)’, ‘ \1’, ‘aE’
Find and Replace ‘(\)|\])’, ‘\1 ’, ‘aE’
Find and Replace ‘\s*([,.;:\!\?\)\]])‘, ‘\1’, ‘aE’
Find and Replace ‘,([.;:\!\?])’, ‘\1’, ‘aE’
Find and Replace '(?<=[,.:;!?])(?=\p{Latin})', ' ', 'aE'
Find and Replace ‘ +’, ‘ ’, ‘aE’
Find and Replace ‘^[\t ]+|[\t ]+$’, ‘’, ‘aE'
Find and Replace ‘^[\t ]+|[\t ]+$’, ‘’, ‘aE'

which is applied to the whole text of the file.
Who can correct it , so that i can apply the clean up macro ONLY TO A SELECTED TEXT?
Thanks
lellius

Groucho
Posts: 496
Joined: 2007-03-03 09:55:06
Location: Europe

Post by Groucho » 2008-01-28 13:09:18

Hi, Lellius

Change 'aE' into 'saE'

s standing for 'search in selection only'

Also, see Nisus Help and Nisus Macro Reference that is shipped with the last two versions of NWP.

Cheers
Henry

lellius
Posts: 40
Joined: 2002-08-15 22:06:44

Post by lellius » 2008-01-30 07:18:04

Hello Henry,
many thanks.
it does work
gio

Post Reply