Page 1 of 1

clean up on selected text

Posted: 2008-01-28 06:31:45
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

Posted: 2008-01-28 13:09:18
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

Posted: 2008-01-30 07:18:04
by lellius
Hello Henry,
many thanks.
it does work
gio