I want to search for the occurrence of type .
super([A-Za-z]+ , self)
in a codebase .
when I am going for
$ grep -nr '[s][u][p][e][r][(]' .
its showing me all the lines which has super(
,
when I tried to search for the below one with [A-Za-z]+ , I am not getting any result.Can someone please help me to search for all lines in my codebase which has super(*word* , self)
in it.
anupam:codebase-2.0$ grep -nr '[s][u][p][e][r][(][A-Za-z]+' .
anupam:codebase-2.0$
[s][u][p][e][r][(]
instead of justsuper(
? In any case, your regex is likely failing because you are using BRE and not escaping the+
, i.e. you should use\+
. – Sparhawk Sep 24 '18 at 10:11