View Single Post
  #2   Report Post  
Posted to microsoft.public.word.docmanagement
Jay Freedman Jay Freedman is offline
external usenet poster
 
Posts: 9,854
Default Selective Replace in Search and Replace

You can use a wildcard replacement
(http://www.gmayor.com/replace_using_wildcards.htm).

Use the search term

([^13])([A-Za-z])

and the replacement term

\1^t\2


However, if what you're trying to achieve is an indent at the start of
each paragraph, then don't do it by adding a tab. Instead, modify the
paragraph style to include a first-line indent.

--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the
newsgroup so all may benefit.

On Thu, 24 Dec 2009 08:55:01 -0800, msnyc07
wrote:

I need to search and replace in a large document. I don't want to replace the
entire search term/expression just part of it. In this case I am searching
for a paragraph return followed by any letter (not digit) and then want to
change that to paragraph/tab but keep the letter. The search looks like this

^p^$

but naturally if replace is



^p^t

I lose the first letter of the text string which I don't want

How can I construct either search and replace so that



^p

Alexander

turns into

^p

^tAlexander

and not

^p

^tlexander



Thanks in advance!