How find words that match criteria
-
I have a long list of words whereof I want to find specific words that are
- for example 5 characters long
- has some letters that I know and some that I don’t know
-
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 expressionWhen 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 expressionThe
.
would represent the letters you don’t know. -
@alan-kilborn
Hey, that works. Thanks! -
@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 expressionI think you can see how you might adjust it to use any specific number of characters…