I have a large dictionary file, in which each line has a different
English language word. The problem I encountered was not the example
that follows, the example is much simpler but displays the same
characteristic as the problem.
I want to search the file to find all three-letter words that have no
repeat characters; i.e., each letter in the word is unique.
Here's my GREP pattern: ^(.)([^\1])[^\1\2]\r
If I understand this right, the (.) is the first character, then ([^
\1]) is any character that is not the same as the first, then [^\1\2]
is any character that is not the same as the first or second. (I
enclosed the expression in ^ ... \r to exclude three-letter sub-
strings.)
The behavior is not as I expected. The returned list contains "aah",
"add", "all", and other words with repeated characters. In fact, the
list is identical to that I get searching with ^.{3}\r, i.e., all
three-letter words.
If I have misunderstood how GREP works, and this is normal behavior,
then how do I find words with non-repeats?
Thanks,
Bull
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "BBEdit Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/bbedit?hl=en
If you have a specific feature request or would like to report a suspected (or
confirmed) problem with the software, please email to "[EMAIL PROTECTED]"
rather than posting to the group.
-~----------~----~----~----~------~----~------~--~---