cat test.txt | "egrep -i (.).*\1"
It should do the job.
You can read at least one character matching wild-card is repeated.
I can not figure out what the regular grammar would be for repetition. In fact grep is an NFA, probably a push-down automaton.
If you can not write grammar rules, the language is not well defined, possibly incomplete and leaving bug in programs.
【 在 Haar (Haar) 的大作中提到: 】
提示: 本博文来自于 Programming 版