I am trying the following query, but without success
grep -nr "[[:alnum:]]+\.[[:alnum:]]+\(\)" .
So, according to my logic, a method call would be one or more alphanumeric characters
[[:alnum:]]+
followed by a dot
\.
followed by one or more alphanumeric characters
[[:alnum:]]+
followed by paranthesis (for void return type only)
\(\)
But this query isn’t working. How to write such a query?
grepprovides several types of regex syntax.Your pattern is written is the extended syntax and works with
-Eextended-regexphas an easier/better syntax, andperl-regexpis, well, quite powerful.