Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
![]()
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! |
#2
![]()
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
![]()
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! |
#3
![]()
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
![]()
Awesome and perfect thank you. Now I understand the concept as well
![]() I do need the tab, I was trying to export to Excel as a two column sheet but a few of my several thousand items did not have product #s before them and I didn't want them to inadvertently end up AS product #s. Thanks again!!! "Jay Freedman" wrote: 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! . |
#4
![]()
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
![]()
FYI that concept came in handy immediately.
A large # of the records I imported into the word doc initially it turns out for some reason didn't parse a Return so I ended up with Record1Record2 instead of Record1 Record2 So I did ([a-z])([A-Z]) \1^p\2 and solved it in 10 seconds vs the hours of frustration I'd have ordinarily faced. Thanks! "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! |
Reply |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Search and Insert, Search and Replace, Modify Document Margins | Formatting Long Documents | |||
Need some Search & Replace help | New Users | |||
Search and replace | Microsoft Word Help | |||
Search and Replace | Formatting Long Documents | |||
Search and Replace | Formatting Long Documents |