+ Reply to Thread
Results 1 to 5 of 5

Finding a particular word phrase in word

  1. #1
    Registered User
    Join Date
    04-25-2016
    Location
    ireland
    MS-Off Ver
    2013
    Posts
    2

    Finding a particular word phrase in word

    I need to get to find any text which could be alpha numeric in a format of xxxxx-xxxxx-xxxxx-xxxxx-xxxxx or xxxxx xxxxx xxxxx xxxxx xxxxx format, kindly suggest in word wild search
    thanks

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,926

    Re: Finding a particular word phrase in word

    Provide some samples please?
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Forum Expert macropod's Avatar
    Join Date
    12-22-2011
    Location
    Canberra, Australia
    MS-Off Ver
    Word, Excel & Powerpoint 2003 & 2010
    Posts
    3,726

    Re: Finding a particular word phrase in word

    At its simplest - which is about as complex an expression as a wildcard Find can handle - the expression would be:
    <[! \-]{5}([ \-])[! \-]{5}\1[! \-]{5}\1[! \-]{5}\1[! \-]{5}>
    Cheers,
    Paul Edstein
    [Fmr MS MVP - Word]

  4. #4
    Forum Contributor
    Join Date
    03-08-2011
    Location
    Lubbock, TX, USA
    MS-Off Ver
    MS OFFICE 365 EXCEL, OUTLOOK, WORD, POWERPOINT
    Posts
    194

    Re: Finding a particular word phrase in word

    Quote Originally Posted by macropod View Post
    <[! \-]{5}([ \-])[! \-]{5}\1[! \-]{5}\1[! \-]{5}\1[! \-]{5}>
    I saw that once before. It was in a comic book when the character was cursing....

    I'm glad I never have to get any deeper than cntrl+F and toggle the advanced find to use the occasional wildcard.

  5. #5
    Forum Expert Doc.AElstein's Avatar
    Join Date
    05-23-2014
    Location
    '_- Germany >Outside Building things.... Mostly
    MS-Off Ver
    Office 2003 2007 2010 PC but Not mac. XP and Vista mostly, sometimes Win 7
    Posts
    3,618

    Find like xxxxx xxxxx Wild Card Things -. They make my .. but I wanna know for , so '_-

    Quote Originally Posted by Mr_Phil View Post
    I saw that once before. It was in a comic book when the character was cursing......
    :Lol...
    For what it’s worth, I was shown how to do something similar but more difficult recently, so I can explain this one quite easily now:


    A Wild thing is like a pattern to match to try to look for.
    In other words you are looking for a type or like or similar to set of characters, rather than an exact specific set of characters.

    You have a lot of different Wild things at your disposal to choose from so as to build up a pattern to be looked for.

    Some Wild things used here:

    [ __ ] _ ( list box )
    __ If you were looking not for a wild thing, but rather a specific character, say, y , then you would just type that specific character, y. If you were , however looking for say either of three characters, like a d or c then you need to indicate that either will do. So you would group all options enclosed in a [ ] , like [adc]. You could also for looking for the single character , y , do this [y] __ You do not need to do that, but it does no harm.
    Think of this Wild thing as how to give a list of alternatives to be searched for ( or, as we see later , a list of things not to look for ). Or think of it as a list box

    ( __ )
    Let’s say that in a long string that you are looking for, the first character needed to be a d or c. But let’s say that whatever that found character ended up being , you would like to know , so that you could match that specific found character to another later in the long string. So , for example, say you wanted to find anything like these
    agheöwa
    dnALEKd
    cbao45c
    So you don’t mind if the first character is a d or c , but you would like to know which was found so as to match that to the last character.
    So in our case you would do this:
    ([adc])
    After doing this, you can refer to the single actual found character using
    \1 __ Note, the 1 is referring to the first use of a ( __ ) __ If you wish you can put all your wild thing sections, or any combination of sections in a ( __ ) _ You only need to do it for the sections whose found matching character or characters you wish to know about. But it does no harm to put them all in a ( __ ) _ Just remember when referring to any section via_..
    \x
    _..that x is the sequential number of the ( __ ) sections, counting from the left.
    Just to be clear on this one: say we are looking for either
    yaa
    or
    ybb
    This would be the way that would typically be done to find this, that is to say, this would be the Wild To Search For string:
    y([ab])\1
    Here a couple of alternatives: __ (y)([ab])\2___ ([y])([ab])\2
    In the last two alternatives, we have the possibility to reference 2 sections: Our Count of sequential Indexes of ( __ ) sections is 2. We only need to refer to the second, and can do this with \2

    \
    The \ has another use in addition to the sequential index of the ( __ ) sections which was shown above. This other use is to proceed a character which has a specific meaning in wild things, should you wish to use that as a literal character in the search. So for example , if you were looking for a [ , you would need to do this_..
    \[
    _.. If you did not do this, then Excel would get confused thinking the [ was part of a list box [ __ ]

    !
    This means in general “ “Not” , or “exclude” , what comes after it “. So !d means anything other than a d
    If it is used at the first space of a list box [ __ ] , like this [! __ ] _ then it means anything other than all the characters in the [ _ ] _ So [!adc] would mean any character other than a a d or c

    {x} where x is an integer
    This means look for x times what is proceeding. So
    _ d{2} looks for dd __ Alternatives: [d]{2} __ ([d]){2}
    and
    _ [ad]{2} looks for aa, ad , dd , or da __ Alternative: ([ad]){2}

    _...
    That is as much as we need to know to understand the comic book string given in this Thread.

    We are looking for alpha numeric in a format of
    xxxxx-xxxxx-xxxxx-xxxxx-xxxxx
    or
    xxxxx xxxxx xxxxx xxxxx xxxxx

    We have chosen to break this down into 9 sections. Our strategy is to use appropriate Wild Things to find each of those sections. I give those sections an arbritrary identifying number of 1 – 9. This number is independent of any number, ( Index ) , relating to any used ( __ )
    Please Login or Register  to view this content.
    The second ( and 4th, 6th and 8th) section ( what I have chosen to call position 2 ) will be a separator (that is to say the in between character found at my positions of 2 4 6 and 8 ). For this we are looking for a
    __ space
    or a
    _ - __
    We wish to know what is found at my position 2, so as to look for exactly that again at my position 4 6 and 8. So we will put that second section in a ( __ ). We will not use any other ( __ ) , so the first used ( _ ) counting from the left is referred to via \1 , regardless of where it is. – This number, (1 in this case ) refers to the sequential index of all used ( __ ). I only am using 1 in this case.

    Here is the complete break down of the Wild thing
    Please Login or Register  to view this content.

    Alan
    Wild things.. they make my heart sing.. they make everything... groovy


    http://www.eileenslounge.com/viewtop...=26030#p202122
    http://www.eileenslounge.com/viewtop...=26030#p202322
    https://www.excelforum.com/developme...ml#post4583552
    http://www.excelfox.com/forum/showth...0110#post10110
    Wilds Card Things.. They make my heart Sing.. They make everything.. Groovy
    http://listenonrepeat.com/watch/?v=H...s_-_Wild_Thing
    Last edited by Doc.AElstein; 03-14-2017 at 09:32 AM.
    '_- Google first, like this _ site:ExcelForum.com Gamut
    Use Code Tags: Highlight code; click on the # icon above,
    Post screenshots COPYABLE to a Spredsheet; NOT IMAGES PLEASE
    http://www.excelforum.com/the-water-...ml#post4109080
    https://app.box.com/s/gjpa8mk8ko4vkwcke3ig2w8z2wkfvrtv
    http://excelmatters.com/excel-forums/ ( Scrolll down to bottom )

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Tagged word / phrase count VB help please
    By fairlo in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-08-2016, 05:55 AM
  2. Include random word from the word list with a phrase as suffix or prefix
    By faizzsheikh in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 03-10-2016, 05:53 AM
  3. [SOLVED] Search using a Word/Phrase
    By hiteshasrani43 in forum Excel Programming / VBA / Macros
    Replies: 20
    Last Post: 03-05-2015, 01:02 AM
  4. Highlighting a word or phrase
    By bishoposiris in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-29-2013, 11:11 PM
  5. Formula for finding a word phrase in an entire column/row
    By faizzsheikh in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 12-20-2012, 06:46 AM
  6. Translate a word into a phrase.
    By STSOM in forum Excel General
    Replies: 1
    Last Post: 01-02-2009, 11:19 AM
  7. Finding location in Word works from Word but not from Excel
    By wayneh in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-05-2008, 07:52 AM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1