Community
    • Login

    How find words that match criteria

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    4 Posts 2 Posters 1.0k Views 1 Watching
    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.
    • MineJOT1 1M Offline
      MineJOT1 1
      last edited by

      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
      Alan KilbornA 1 Reply Last reply Reply Quote 0
      • Alan KilbornA Offline
        Alan Kilborn @MineJOT1 1
        last edited by

        @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.

        MineJOT1 1M 1 Reply Last reply Reply Quote 0
        • MineJOT1 1M Offline
          MineJOT1 1 @Alan Kilborn
          last edited by

          @alan-kilborn
          Hey, that works. Thanks!

          Alan KilbornA 1 Reply Last reply Reply Quote 0
          • Alan KilbornA Offline
            Alan Kilborn @MineJOT1 1
            last edited by Alan Kilborn

            @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

            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

            With your input, this post could be even better 💗

            Register Login
            • First post
              Last post
            The Community of users of the Notepad++ text editor.
            Powered by NodeBB | Contributors