Loading ...
Sorry, an error occurred while loading the content.
 

RE: [NTB] search for several terms simultaneously

Expand Messages
  • Art Kocsis
    In mathematics, this is known as an iterative solution - hopefully it converges. ;-) The last iteration from John covers half of them. To fully satisfy your
    Message 1 of 7 , Sep 27, 2011
      In mathematics, this is known as an iterative solution - hopefully it
      converges. ;-)

      The last iteration from John covers half of them. To fully satisfy your
      example add the remaining possibilities.

      <start long line>
      \b(man.+alone.+good|man.+good.+alone|alone.+man.+good|alone.+good.+man|good.+man.+alone|good.+alone.+man)\b
      <end long line>

      And, as has been mentioned previously, check "RegEx" and clear "Case sensitive"

      Note, there are n! (n factorial), unique ways (where the order is
      significant), of choosing n items.

      For three items there are three choices for the 1st item and then for each
      of the first choices, there are two choices for the remaining two items.
      For example: abc: abc, acb, bac, bca, cab, cba.

      Be aware that factorials increase VERY rapidly (4! = 24, 5! = 120, 6! =
      720, ...), so enumerating each possible word sequence is quite unwieldy
      beyond 3 words.

      If you need to do this frequently with four or more words you should
      linearize the search with a clip. (Search for a paragraph containing the
      first word then search the found paragraph for the second word and, if
      found, search again for the next word, etc.) Ask for help on the NTB clip
      forum.

      Namaste', Art


      At 09/27/2011 14:05, you wrote:
      >Sorry, didn't read close enough. The answer is that you'd need all three
      >words in three terms separated by pipes. And a
      >.+ between the words.
      >
      >Place a 'pipe' between the words. Might have to enclose the lot in parens.
      >\b(man.+alone.+good|alone.+man.+good|good.+man.+alone)\b
      >
      >Regards,
      >John
      >
      >-----Original Message-----
      >From: notetab@yahoogroups.com [mailto:notetab@yahoogroups.com] On Behalf
      >Of John Shotsky
      >Sent: Tuesday, September 27, 2011 13:59
      >To: notetab@yahoogroups.com
      >Subject: RE: [NTB] search for several terms simultaneously
      >
      >Place a 'pipe' between the words. Might have to enclose the lot in parens.
      >\b(man|alone|good)\b
      >
      >Regards,
      >John
      >
      >From: notetab@yahoogroups.com [mailto:notetab@yahoogroups.com] On Behalf
      >Of george_elliott2002
      >Sent: Tuesday, September 27, 2011 09:35
      >To: notetab@yahoogroups.com
      >Subject: [NTB] search for several terms simultaneously
      >
      >how do I search a document to find any instance of a paragraph which has
      >all of a group of words; but in any sequence?
      >
      >For instance, search paragraphs for the words "man alone good", without
      >the quotes?
    • george_elliott2002
      Hello Art Kocsis:) Thank for your additional clarification because it was necessary in order for me to correctly understand the user interface of NTB. George
      Message 2 of 7 , Sep 28, 2011
        Hello Art Kocsis:)

        Thank for your additional clarification because it was necessary in order for me to correctly understand the user interface of NTB.

        George Elliott.
        --- In notetab@yahoogroups.com, Art Kocsis <artkns@...> wrote:
        >
        > In mathematics, this is known as an iterative solution - hopefully it
        > converges. ;-)
        >
        > The last iteration from John covers half of them. To fully satisfy your
        > example add the remaining possibilities.
        >
        > <start long line>
        > \b(man.+alone.+good|man.+good.+alone|alone.+man.+good|alone.+good.+man|good.+man.+alone|good.+alone.+man)\b
        > <end long line>
        >
        > And, as has been mentioned previously, check "RegEx" and clear "Case sensitive"
        >
        > Note, there are n! (n factorial), unique ways (where the order is
        > significant), of choosing n items.
        >
        > For three items there are three choices for the 1st item and then for each
        > of the first choices, there are two choices for the remaining two items.
        > For example: abc: abc, acb, bac, bca, cab, cba.
        >
        > Be aware that factorials increase VERY rapidly (4! = 24, 5! = 120, 6! =
        > 720, ...), so enumerating each possible word sequence is quite unwieldy
        > beyond 3 words.
        >
        > If you need to do this frequently with four or more words you should
        > linearize the search with a clip. (Search for a paragraph containing the
        > first word then search the found paragraph for the second word and, if
        > found, search again for the next word, etc.) Ask for help on the NTB clip
        > forum.
        >
        > Namaste', Art
        >
        >
        > At 09/27/2011 14:05, you wrote:
        > >Sorry, didn't read close enough. The answer is that you'd need all three
        > >words in three terms separated by pipes. And a
        > >.+ between the words.
        > >
        > >Place a 'pipe' between the words. Might have to enclose the lot in parens.
        > >\b(man.+alone.+good|alone.+man.+good|good.+man.+alone)\b
        > >
        > >Regards,
        > >John
        > >
        > >-----Original Message-----
        > >From: notetab@yahoogroups.com [mailto:notetab@yahoogroups.com] On Behalf
        > >Of John Shotsky
        > >Sent: Tuesday, September 27, 2011 13:59
        > >To: notetab@yahoogroups.com
        > >Subject: RE: [NTB] search for several terms simultaneously
        > >
        > >Place a 'pipe' between the words. Might have to enclose the lot in parens.
        > >\b(man|alone|good)\b
        > >
        > >Regards,
        > >John
        > >
        > >From: notetab@yahoogroups.com [mailto:notetab@yahoogroups.com] On Behalf
        > >Of george_elliott2002
        > >Sent: Tuesday, September 27, 2011 09:35
        > >To: notetab@yahoogroups.com
        > >Subject: [NTB] search for several terms simultaneously
        > >
        > >how do I search a document to find any instance of a paragraph which has
        > >all of a group of words; but in any sequence?
        > >
        > >For instance, search paragraphs for the words "man alone good", without
        > >the quotes?
        >
      Your message has been successfully submitted and would be delivered to recipients shortly.