Text Cleanup

Top  Previous  Next

The User Interface > Preview/Edit Window > Text/Edit Tab > Editor Toolbar... > Text Cleanup

This function cleans up text by running it through a series of functions:

1.Strip - This removes characters, such as those ugly >>> marks that often appear in forwarded E-Mail or Newsgroup postings.  You can specify that they be removed at the beginning or end of any line – plus an option for "anywhere".  There are some popular pre-defined characters to be removed, or you can specify others in the "others" area.
2.Format Paragraphs - This invokes the Remove Linebreaks function.  You can leave the data "as-is", remove the linebreaks within paragraphs, or remove ALL linebreaks.  There is an additional option to add linebreaks back in, at a pre-determined column.  It'll use intelligent word-wrapping, so the right-margin will be "ragged", as it wraps at the last opportunity before the indicated margin. This step can also re-break and re-quote the new lines.
3.Case - This will use the Case Conversion function, just as if you'd invoked it by itself.  It happens AFTER the first two steps, to take advantage of any corrections to sentence structure.
4.Find & Replace - This performs a search on the text, replacing as required.  It replaces all occurances found in the text.  This feature can use Regular Expressions, which while complicated, are very powerful. To use RegEx, you need to use the "RegEx" checkbox to tell ClipMate that your search (or replace) criteria is intended to be a regular expression.  For example, ^Hello  (if treated as RegEx) will search for lines beginning with "Hello".  Goodbye$ (again, if the RegEx option is selected), will search for lines ENDING in "Goodbye".  Interestingly, the REPLACE string can also be a RegEx, which will act as a "template" for the substitution.  This is a very advanced feature, but will be handy for programmers familiar with RegEx.  We hope to offer some useful examples for the rest of us!

Find & Replace Options

1.Match Case - search is case senstivie or not.
2.RegEx (Find) - treat the search as a Regular Expression.
3.RegEx (Replace) - use the replace text as a RegEx template (more below).
4.Line By Line - for RegEx only - treat entire clip as one "line", or treat each line in the editor as a separate line.  Useful for begin/end line processing (^,$).

RegEx Templates - Useful for using "templates" for the replacement. Use the $& within the substitution string, to specify where the "found" string goes into the output.

ex:  Supose your text is:

have a day.

have a night.

And you do a RegEx find & replace, of:   Find: (day|night)     Replace: good ($&)


The output will be:

have a good day.

have a good night.


Note: The Text Cleanup function, although powerful, may not always produce the intended result.  If it makes a mess of things hit the UNDO button, and try it again.  It's meant to perform MOST of the clean-up work, not necessarily all of it, nor will it work in all situations.  Sometimes a slight manual edit is all that it needs to be successful.


See Also:

Regular Expressions
RegEx Cleanup Examples