|Chronology||Current Month||Current Thread||Current Date|
|[Year List] [Month List (current year)]||[Date Index] [Thread Index]||[Thread Prev] [Thread Next]||[Date Prev] [Date Next]|
I read John's message again and understand it now. Unless there
is a better way I will do what he suggested.
John Denker wrote:
At 04:08 PM 1/31/01 -0500, Ludwik Kowalski wrote:
I have a long document in which there are CRs at the end of lines. I want to
remove all of them. Instead of doing this manually (line by line) I would
like to do this automatically. Is there a command for killing specified
ASCII characters in Microsoft Word6 for Mac?
There are several different scenarios that semi-fit this description. One
common case goes like this:
What LK is calling CR is (in this scenario) not an ascii CR; it is an
ascii LF which microsoft in its 1/infinite wisdom treats as a paragraph
break. Meanwhile (in this scenario) whoever wrote the document is using LF
to denote end-of-line (in compliance with ascii standards) and is probably
using double-LF to denote real paragraph breaks.
The only trick to cleaning up this mess lies in protecting the
double-LF. So the procedure is:
1) Do a search-and-replace, namely
find what: ^p^p (match double LF)
replace with: <**par**> (placeholder)
2) Do another search-and-replace, namely
find what: ^p (match remaining LFs)
replace with: (a single space)
3) Do yet another search-and-replace, namely
find what: <**par**>
replace with: ^p
If you want to get fancy, for added reliability you can add a step (0) to
get rid of gratuitous spaces before and after ^p (LF) characters.
Note: This trick of temporarily renaming something to an
arbitrarily-chosen temporary value is high on the list of super-common,
Note: The use of expressions like ^p to match special characters is
documented on the pulldowns on the search-and-replace popup.
If I have guessed wrong about the scenario, please ask again with