clean up on selected text

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

clean up on selected text

Post by lellius »

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: 497
Joined: 2007-03-03 09:55:06
Location: Europe

Post by Groucho »

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: 54
Joined: 2002-08-15 22:06:44

Post by lellius »

Hello Henry,
many thanks.
it does work
gio
Post Reply