Hi,

Can someone tell me what I am doing wrong here. I am trying to find all
instances of the following in my document:
Appendix 3
Appendix 7.6
Appendix 8.8.9.9.9
etc

I want to find using 1 expression. This is what I am using :
(Appendix)([0-9|.| ]@{1,}) and it works fine but doesn't pick all of them.
For example: I have Appendix 8.1.3, Appendix 8.1.4, Appendix 8.1.5, Appendix
8.1.6 So it picks up the first 2, skips the 3rd one and finds the 4th one...I
don't understand why it does that? Can someone help me.

Thank you in Advance.

~ mehj

Re: Wildcards by Jay

Jay
Sat Apr 30 19:02:48 CDT 2005

On Sat, 30 Apr 2005 16:03:28 -0700, "major"
<major@discussions.microsoft.com> wrote:

>Hi,
>
>Can someone tell me what I am doing wrong here. I am trying to find all
>instances of the following in my document:
>Appendix 3
>Appendix 7.6
>Appendix 8.8.9.9.9
>etc
>
>I want to find using 1 expression. This is what I am using :
>(Appendix)([0-9|.| ]@{1,}) and it works fine but doesn't pick all of them.
>For example: I have Appendix 8.1.3, Appendix 8.1.4, Appendix 8.1.5, Appendix
>8.1.6 So it picks up the first 2, skips the 3rd one and finds the 4th one...I
>don't understand why it does that? Can someone help me.
>
>Thank you in Advance.
>
>~ mehj

Your syntax has some extra stuff in it, but that shouldn't affect
whether it finds all occurrences.

You can remove the pipe ( | ) characters from the expression in square
brackets. There is no "or" operator for set expressions; all
characters within the brackets are automatically or'ed. Also remove
the @ character. Finally, move the space character from the set to the
position after the word Appendix. This search expression works:

(Appendix )([0-9.]{1,})

See http://www.gmayor.com/replace_using_wildcards.htm for a full
explanation.

However, in my test your original expression also worked, and it found
all occurrences. Check the text where the missed occurrences are,
turning on nonprinting characters if necessary -- maybe there's a
misspelling, or in some other way they don't really match the
expression.

--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org

Re: Wildcards by major

major
Sat Apr 30 20:18:07 CDT 2005

Thanks Jay, you saved my life. I been staring at this document for the past 2
hrs wondering what the heck I was doing wrong:( I just turned on the hidden
characters, turns out there were non-breaking spaces in some text and hence
wasn't matching the expression. It's all taken care of now. Thanks a billion
:-)

"Jay Freedman" wrote:

> On Sat, 30 Apr 2005 16:03:28 -0700, "major"
> <major@discussions.microsoft.com> wrote:
>
> >Hi,
> >
> >Can someone tell me what I am doing wrong here. I am trying to find all
> >instances of the following in my document:
> >Appendix 3
> >Appendix 7.6
> >Appendix 8.8.9.9.9
> >etc
> >
> >I want to find using 1 expression. This is what I am using :
> >(Appendix)([0-9|.| ]@{1,}) and it works fine but doesn't pick all of them.
> >For example: I have Appendix 8.1.3, Appendix 8.1.4, Appendix 8.1.5, Appendix
> >8.1.6 So it picks up the first 2, skips the 3rd one and finds the 4th one...I
> >don't understand why it does that? Can someone help me.
> >
> >Thank you in Advance.
> >
> >~ mehj
>
> Your syntax has some extra stuff in it, but that shouldn't affect
> whether it finds all occurrences.
>
> You can remove the pipe ( | ) characters from the expression in square
> brackets. There is no "or" operator for set expressions; all
> characters within the brackets are automatically or'ed. Also remove
> the @ character. Finally, move the space character from the set to the
> position after the word Appendix. This search expression works:
>
> (Appendix )([0-9.]{1,})
>
> See http://www.gmayor.com/replace_using_wildcards.htm for a full
> explanation.
>
> However, in my test your original expression also worked, and it found
> all occurrences. Check the text where the missed occurrences are,
> turning on nonprinting characters if necessary -- maybe there's a
> misspelling, or in some other way they don't really match the
> expression.
>
> --
> Regards,
> Jay Freedman
> Microsoft Word MVP FAQ: http://word.mvps.org
>

Re: Wildcards by major

major
Sat Apr 30 22:19:34 CDT 2005

Hi,

I have another question in regards to this. This doc also has multiple
references, for ex:
Appendix 8.4
Appendices 8.3 and 8.4
Appendices 8.3, 8.4, 8.5 and 8.6

Then again I want to be able to find these using I equation if possible, I
don't want to write multiple equations as I wouldn't know how many references
there will be.

So far I wrote this:
(Appendi[xces]{1,})([^s ])([0-9., and]{1,}) But this also picks up and if
not in a sentence (for ex: Appendix 10.2.2, and) and I don't want that. Is
there a way to work around this?

Thank you!

~ mehj

"major" wrote:

> Thanks Jay, you saved my life. I been staring at this document for the past 2
> hrs wondering what the heck I was doing wrong:( I just turned on the hidden
> characters, turns out there were non-breaking spaces in some text and hence
> wasn't matching the expression. It's all taken care of now. Thanks a billion
> :-)
>
> "Jay Freedman" wrote:
>
> > On Sat, 30 Apr 2005 16:03:28 -0700, "major"
> > <major@discussions.microsoft.com> wrote:
> >
> > >Hi,
> > >
> > >Can someone tell me what I am doing wrong here. I am trying to find all
> > >instances of the following in my document:
> > >Appendix 3
> > >Appendix 7.6
> > >Appendix 8.8.9.9.9
> > >etc
> > >
> > >I want to find using 1 expression. This is what I am using :
> > >(Appendix)([0-9|.| ]@{1,}) and it works fine but doesn't pick all of them.
> > >For example: I have Appendix 8.1.3, Appendix 8.1.4, Appendix 8.1.5, Appendix
> > >8.1.6 So it picks up the first 2, skips the 3rd one and finds the 4th one...I
> > >don't understand why it does that? Can someone help me.
> > >
> > >Thank you in Advance.
> > >
> > >~ mehj
> >
> > Your syntax has some extra stuff in it, but that shouldn't affect
> > whether it finds all occurrences.
> >
> > You can remove the pipe ( | ) characters from the expression in square
> > brackets. There is no "or" operator for set expressions; all
> > characters within the brackets are automatically or'ed. Also remove
> > the @ character. Finally, move the space character from the set to the
> > position after the word Appendix. This search expression works:
> >
> > (Appendix )([0-9.]{1,})
> >
> > See http://www.gmayor.com/replace_using_wildcards.htm for a full
> > explanation.
> >
> > However, in my test your original expression also worked, and it found
> > all occurrences. Check the text where the missed occurrences are,
> > turning on nonprinting characters if necessary -- maybe there's a
> > misspelling, or in some other way they don't really match the
> > expression.
> >
> > --
> > Regards,
> > Jay Freedman
> > Microsoft Word MVP FAQ: http://word.mvps.org
> >

Re: Wildcards by Jezebel

Jezebel
Sat Apr 30 22:43:34 CDT 2005

You'll need to find a way to specify formally the difference between the
ones you want and the ones you don't. If all the ones you want form an
entire paragraph, you can include the paragraph marks in your search:
^013(Appendi....


"major" <major@discussions.microsoft.com> wrote in message
news:81B63D90-27FD-4AD4-BDDE-B451BFF05960@microsoft.com...
> Hi,
>
> I have another question in regards to this. This doc also has multiple
> references, for ex:
> Appendix 8.4
> Appendices 8.3 and 8.4
> Appendices 8.3, 8.4, 8.5 and 8.6
>
> Then again I want to be able to find these using I equation if possible, I
> don't want to write multiple equations as I wouldn't know how many
> references
> there will be.
>
> So far I wrote this:
> (Appendi[xces]{1,})([^s ])([0-9., and]{1,}) But this also picks up and if
> not in a sentence (for ex: Appendix 10.2.2, and) and I don't want that. Is
> there a way to work around this?
>
> Thank you!
>
> ~ mehj
>
> "major" wrote:
>
>> Thanks Jay, you saved my life. I been staring at this document for the
>> past 2
>> hrs wondering what the heck I was doing wrong:( I just turned on the
>> hidden
>> characters, turns out there were non-breaking spaces in some text and
>> hence
>> wasn't matching the expression. It's all taken care of now. Thanks a
>> billion
>> :-)
>>
>> "Jay Freedman" wrote:
>>
>> > On Sat, 30 Apr 2005 16:03:28 -0700, "major"
>> > <major@discussions.microsoft.com> wrote:
>> >
>> > >Hi,
>> > >
>> > >Can someone tell me what I am doing wrong here. I am trying to find
>> > >all
>> > >instances of the following in my document:
>> > >Appendix 3
>> > >Appendix 7.6
>> > >Appendix 8.8.9.9.9
>> > >etc
>> > >
>> > >I want to find using 1 expression. This is what I am using :
>> > >(Appendix)([0-9|.| ]@{1,}) and it works fine but doesn't pick all of
>> > >them.
>> > >For example: I have Appendix 8.1.3, Appendix 8.1.4, Appendix 8.1.5,
>> > >Appendix
>> > >8.1.6 So it picks up the first 2, skips the 3rd one and finds the 4th
>> > >one...I
>> > >don't understand why it does that? Can someone help me.
>> > >
>> > >Thank you in Advance.
>> > >
>> > >~ mehj
>> >
>> > Your syntax has some extra stuff in it, but that shouldn't affect
>> > whether it finds all occurrences.
>> >
>> > You can remove the pipe ( | ) characters from the expression in square
>> > brackets. There is no "or" operator for set expressions; all
>> > characters within the brackets are automatically or'ed. Also remove
>> > the @ character. Finally, move the space character from the set to the
>> > position after the word Appendix. This search expression works:
>> >
>> > (Appendix )([0-9.]{1,})
>> >
>> > See http://www.gmayor.com/replace_using_wildcards.htm for a full
>> > explanation.
>> >
>> > However, in my test your original expression also worked, and it found
>> > all occurrences. Check the text where the missed occurrences are,
>> > turning on nonprinting characters if necessary -- maybe there's a
>> > misspelling, or in some other way they don't really match the
>> > expression.
>> >
>> > --
>> > Regards,
>> > Jay Freedman
>> > Microsoft Word MVP FAQ: http://word.mvps.org
>> >