I need to take documents convert them to plain text, remove all the hidden characters except spaces, set a right margin and finally replace all the spaces right before the margin with line breaks. I have the first three worked out however none of my searches have given me a regular expression(s) that will replace the spaces just before the right margin with line breaks.
Thanks in advance.
