Results 1 to 12 of 12
  1. #1
    Platinum Lounger
    Join Date
    Nov 2001
    Location
    Vienna, Wien, Austria
    Posts
    5,009
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Is there a special code enterable in the Find box to search for instances where words are entirely in Upper Case?
    Gre

  2. #2
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts
    [quote name='unkamunka' post='767303' date='25-Mar-2009 10:30']Is there a special code enterable in the Find box to search for instances where words are entirely in Upper Case?[/quote]
    I think you might need to do a wildcard search. The following pattern finds capitalized words between certain boundary characters, but it's not very convenient to have the boundary characters selected:

    Code:
    [ .,;^13]{1}[A-Z]@[ .,;^13]{1}
    Hopefully someone else has a better suggestion.

  3. #3
    Plutonium Lounger
    Join Date
    Nov 2001
    Posts
    10,550
    Thanks
    0
    Thanked 7 Times in 7 Posts
    [quote name='jscher2000' post='767308' date='25-Mar-2009 17:55']
    Code:
    [ .,;^13]{1}[A-Z]@[ .,;^13]{1}
    [/quote]

    I think you could improve this a bit with
    Code:
    [!A-z][A-Z]@[!A-z]
    This will find any number of capital letters that don't have a lower case letter before or after them.
    If you wan't to avoid matches for single letter words like I, or A at the beginning of a sentence, then you could use

    Code:
    [!A-z][A-Z][A-Z]@[!A-z]

  4. #4
    Platinum Lounger
    Join Date
    Nov 2001
    Location
    Vienna, Wien, Austria
    Posts
    5,009
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Many thanks
    [quote name='StuartR' post='767313' date='25-Mar-2009 21:10']
    Code:
    [!A-z][A-Z][A-Z]@[!A-z]
    [/quote] is what I was looking for.
    Gre

  5. #5
    Plutonium Lounger
    Join Date
    Nov 2001
    Posts
    10,550
    Thanks
    0
    Thanked 7 Times in 7 Posts
    [quote name='unkamunka' post='767316' date='25-Mar-2009 18:31']Many thanks
    Code:
    [!A-z][A-Z][A-Z]@[!A-z]
    is what I was looking for. [/quote]
    I think this could be improved a bit by changing A-z into 0-Z, like this
    Code:
    [!0-z][A-Z][A-Z]@[!0-z]
    this will avoid matching strings like AB29

  6. #6
    Silver Lounger
    Join Date
    Jul 2001
    Location
    Ottawa, Ontario, Canada
    Posts
    1,609
    Thanks
    0
    Thanked 1 Time in 1 Post
    [quote name='unkamunka' post='767303' date='25-Mar-2009 13:30']Is there a special code enterable in the Find box to search for instances where words are entirely in Upper Case?[/quote]
    I take it that you wish to find all words that are uppercase, since you have disregarded the 'Match Case' option.

    Am I correct?
    [attachment=83054:Match_Case.JPG]
    Regards
    Don

  7. #7
    Silver Lounger
    Join Date
    Jul 2001
    Location
    Ottawa, Ontario, Canada
    Posts
    1,609
    Thanks
    0
    Thanked 1 Time in 1 Post
    [quote name='StuartR' post='767322' date='25-Mar-2009 15:05']I think this could be improved a bit by changing A-z into 0-Z, like this
    Code:
    [!0-z][A-Z][A-Z]@[!0-z]
    this will avoid matching strings like AB29[/quote]
    And "Thank you." from me also Stuart. Can you point me to some explanatory data? I am intrigued.
    Regards
    Don

  8. #8
    Plutonium Lounger
    Join Date
    Nov 2001
    Posts
    10,550
    Thanks
    0
    Thanked 7 Times in 7 Posts
    [quote name='wdwells' post='767342' date='25-Mar-2009 20:15']Can you point me to some explanatory data?[/quote]

    In a wildcard search you can put a sequence in [ ] brackets to match any term. this is commonly used with things like [0-9] or [A-Z] but it will work with any sequence.

    Since the ASCII character set is ordered with 0-9 followed by A-Z followed by a-z, the sequence [0-z] matches any number or letter. The ! character says NOT, so [!0-z] means any character that is not a number or letter.

    [A-Z] matches any upper case character, and @ means 1 or more of the preceding character. So [A-Z]@ means 1 or more upper case characters.

    If we put another [A-Z] in front of [A-Z]@ then this gives [A-Z][A-Z]@ which means two or more consecutive upper case letters.

    This is then bracketed with the [!0-z] to give the whole expression which can be read as
    "Something that is not a number or letter, followed by two or more upper case letters, followed by something that is not a number or letter"

  9. #9
    Silver Lounger
    Join Date
    Jul 2001
    Location
    Ottawa, Ontario, Canada
    Posts
    1,609
    Thanks
    0
    Thanked 1 Time in 1 Post
    Thank you for the clear and thorough explanation.
    Regards
    Don

  10. #10
    Silver Lounger
    Join Date
    Jul 2001
    Location
    Ottawa, Ontario, Canada
    Posts
    1,609
    Thanks
    0
    Thanked 1 Time in 1 Post
    [quote name='StuartR' post='767322' date='25-Mar-2009 15:05']I think this could be improved a bit by changing A-z into 0-Z, like this
    Code:
    [!0-z][A-Z][A-Z]@[!0-z]
    this will avoid matching strings like AB29[/quote]
    Hi again Stuart
    I have obviously missed something basic here. Can you tell me where I've gone wrong. I'm using Word 2003 SP3
    [attachment=83063:Search_Code.gif]
    Attached Images Attached Images
    Regards
    Don

  11. #11
    Super Moderator
    Join Date
    May 2002
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    5,055
    Thanks
    2
    Thanked 417 Times in 346 Posts
    [quote name='wdwells' post='767435' date='26-Mar-2009 13:12']Hi again Stuart
    I have obviously missed something basic here. Can you tell me where I've gone wrong. I'm using Word 2003 SP3[/quote]
    Hi Don,

    Did you check the 'use wildcards' option?
    Cheers,

    Paul Edstein
    [MS MVP - Word]

  12. #12
    Silver Lounger
    Join Date
    Jul 2001
    Location
    Ottawa, Ontario, Canada
    Posts
    1,609
    Thanks
    0
    Thanked 1 Time in 1 Post
    [quote name='wdwells' post='767435' date='25-Mar-2009 22:12']Hi again Stuart
    I have obviously missed something basic here. Can you tell me where I've gone wrong. I'm using Word 2003 SP3
    [attachment=83063:Search_Code.gif][/quote]

    Thank you Paul; That was it.
    Regards
    Don

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •