Issue
I want to find aaa, bbb etc I've tried :
grep -E [a-z]\{3\} 1.txt
but this even prints abc
Solution
You can use references to capturing groups:
[/tmp] cat test.txt
aaa
bbb
abc
aab
bbc
[/tmp] grep -E "([a-z])\1{2}" test.txt
aaa
bbb
\1
refers to the stuff captured by ([a-z])
(a single letter, in your case), so the regex looks for a single letter followed by the same letter two more times.
Answered By - Blender Answer Checked By - Cary Denson (WPSolving Admin)