remove_lines_with_duplicate_letters
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
remove_lines_with_duplicate_letters [2023/08/11 14:40] – ↷ Page name changed from remove_lines_duplicate_letters to remove_lines_with_duplicate_letters raju | remove_lines_with_duplicate_letters [2023/08/27 23:48] (current) – raju | ||
---|---|---|---|
Line 3: | Line 3: | ||
Find five letter words that are made up of letters {h, i, k, e, r, s} where each letter appears only once. | Find five letter words that are made up of letters {h, i, k, e, r, s} where each letter appears only once. | ||
==== Issue ==== | ==== Issue ==== | ||
- | If we do | ||
< | < | ||
- | grep -i " | + | grep -Ei " |
- | < | + | </code> |
- | shows | + | gives |
< | < | ||
Essie | Essie | ||
Line 17: | Line 16: | ||
... | ... | ||
</ | </ | ||
- | some of the words have the letters duplicated. For example, | + | where some letters are duplicated in some of the words. For example, the letter ' |
==== Solution ==== | ==== Solution ==== | ||
+ | Pipe the output to '' | ||
+ | |||
< | < | ||
- | % grep -i " | + | % grep -Ei " |
Sheri | Sheri | ||
Shrek | Shrek | ||
Line 32: | Line 34: | ||
skier | skier | ||
</ | </ | ||
+ | |||
+ | ==== Ref ==== | ||
+ | * https:// | ||
+ | * I got the idea from here. | ||
+ | * (Mastering Regular Expressions, | ||
+ | |||
remove_lines_with_duplicate_letters.1691764807.txt.gz · Last modified: 2023/08/11 14:40 by raju