Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.docmanagement
Hikari Hikari is offline
external usenet poster
 
Posts: 1
Default Word find/replace equivalent of (word1|word2)

Hello All,

New poster, I did my best to search for this answer using keywords
such as: atomic grouping, alternatives, bar OR pip equivalent, etc...
but had no luck

My question is, is there/what is the Microsoft Word find/replace
equivalent of the regular expression

(word1|word2)

?

I've obviously tried | and \| with no luck. And any webpage I found
with discussion of advanced find/replace for word did not go into
atomic grouping.

Thanks so much!

-Hikari
  #2   Report Post  
Posted to microsoft.public.word.docmanagement
Idaho Word Man Idaho Word Man is offline
external usenet poster
 
Posts: 417
Default Word find/replace equivalent of (word1|word2)

Have you tried the article that is found he
http://www.gmayor.com/replace_using_wildcards.htm

It might contain some suggestions that would help you.

Fred

"Hikari" wrote:

Hello All,

New poster, I did my best to search for this answer using keywords
such as: atomic grouping, alternatives, bar OR pip equivalent, etc...
but had no luck

My question is, is there/what is the Microsoft Word find/replace
equivalent of the regular expression

(word1|word2)

?

I've obviously tried | and \| with no luck. And any webpage I found
with discussion of advanced find/replace for word did not go into
atomic grouping.

Thanks so much!

-Hikari
.

  #3   Report Post  
Posted to microsoft.public.word.docmanagement
Pesach Shelnitz[_2_] Pesach Shelnitz[_2_] is offline
external usenet poster
 
Posts: 277
Default Word find/replace equivalent of (word1|word2)

Hi Hikari,

If you want to find two different words in a search, you can use wildcards
in the "Find what" box. To do this, perform the following steps.
1. In the "Find what" box, type []{n,m}
2. Between the square brackets, type all the letters that appear in the two
words in alphabetical order.
3. Replace n with the length of the shorter word.
4. Replace m with the length of the longer word.
5. Click "More".
6. Select "Use wildcards".
7. Click "Find Next".

For example, if you want to find "airplane" or "boat", the search string
would be as follows:
[abeilnoprt]{4,8}

Unfortunately, this search can also find other words that match the
criteria, but it will find all instances of airplane and boat.

After you do a wildcard search, I recommend that you clear the "Use
wildcards" checkbox and search for something else immediately.

For more information about wildcard searches, see
http://word.mvps.org/FAQs/General/UsingWildcards.htm .

--
Hope this helps,
Pesach Shelnitz
http://makeofficework.com


"Hikari" wrote:

Hello All,

New poster, I did my best to search for this answer using keywords
such as: atomic grouping, alternatives, bar OR pip equivalent, etc...
but had no luck

My question is, is there/what is the Microsoft Word find/replace
equivalent of the regular expression

(word1|word2)

?

I've obviously tried | and \| with no luck. And any webpage I found
with discussion of advanced find/replace for word did not go into
atomic grouping.

Thanks so much!

-Hikari
.

  #4   Report Post  
Posted to microsoft.public.word.docmanagement
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default Word find/replace equivalent of (word1|word2)

If the words are bracketed as shown then
\([a-zA-Z]{2,}|[a-zA-Z]{2,}\)
will find them
If the words are not bracketed use
[a-zA-Z]{2,}|[a-zA-Z]{2,}
These will find the whole string. Depending upon what you want to do with
the string having found it determines whether anything else needs to be
added.
See http://www.gmayor.com/replace_using_wildcards.htm

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org





Hikari wrote:
Hello All,

New poster, I did my best to search for this answer using keywords
such as: atomic grouping, alternatives, bar OR pip equivalent, etc...
but had no luck

My question is, is there/what is the Microsoft Word find/replace
equivalent of the regular expression

(word1|word2)

?

I've obviously tried | and \| with no luck. And any webpage I found
with discussion of advanced find/replace for word did not go into
atomic grouping.

Thanks so much!

-Hikari



Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
where do I find the :find & replace when I need to edit in word jagchick New Users 2 August 2nd 08 12:28 AM
Find+Replace Dialog Box, Replace with Format problem Kathy Microsoft Word Help 3 February 1st 08 04:26 AM
Find multiple characters in one find using MSword find/replace Cliff Microsoft Word Help 2 October 29th 06 07:48 PM
Using find and replace or macros to replace page ranges JeremyC Microsoft Word Help 7 February 13th 06 09:20 PM
Find/ Replace is auto-capping the words I want to replace with Graham Mayor Microsoft Word Help 8 January 27th 06 01:39 AM


All times are GMT +1. The time now is 04:38 AM.

Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"