• Login
Community
  • Login

How find words that match criteria

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
4 Posts 2 Posters 663 Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M
    MineJOT1 1
    last edited by Jan 15, 2022, 11:19 AM

    I have a long list of words whereof I want to find specific words that are

    1. for example 5 characters long
    2. has some letters that I know and some that I don’t know
    A 1 Reply Last reply Jan 15, 2022, 3:09 PM Reply Quote 0
    • A
      Alan Kilborn @MineJOT1 1
      last edited by Jan 15, 2022, 3:09 PM

      @minejot1-1

      So the use of “word” implies that you define a word appropriately. A common definition is characters from the English set A,B,C,…,Z or lowercase, the digits 0,1,2,…9, and the underscore character. If this is acceptable then for your first question an expression to search on would be:

      find: \b\w{5}\b
      mode: regular expression

      When coupled with your second condition, I might go with a search expression like this one, for the word letter with some letters you don’t know:

      find: (?=\b\w{5}\b)(?i)l.tt.r
      mode: regular expression

      The . would represent the letters you don’t know.

      M 1 Reply Last reply Jan 15, 2022, 3:22 PM Reply Quote 0
      • M
        MineJOT1 1 @Alan Kilborn
        last edited by Jan 15, 2022, 3:22 PM

        @alan-kilborn
        Hey, that works. Thanks!

        A 1 Reply Last reply Jan 15, 2022, 3:51 PM Reply Quote 0
        • A
          Alan Kilborn @MineJOT1 1
          last edited by Alan Kilborn Jan 15, 2022, 3:52 PM Jan 15, 2022, 3:51 PM

          @minejot1-1 said in How find words that match criteria:

          that works

          Hmm. I swear that I have early dementia.
          When I tested it out I used a 5-letter-word.
          But when I posted, for some reason I changed it to a 6-letter example (“letter”), which would not work the way I wrote it before.

          So maybe change my prior example to:

          find: (?=\b\w{6}\b)(?i)l.tt.r
          mode: regular expression

          I think you can see how you might adjust it to use any specific number of characters…

          1 Reply Last reply Reply Quote 2
          4 out of 4
          • First post
            4/4
            Last post
          The Community of users of the Notepad++ text editor.
          Powered by NodeBB | Contributors