I want to match all the lines that are of the below pattern in a file using grep
.
Abc::xyz() [18-Feb-15 12:09:16]
I came up with below regex with grep , but it is not returning match. Please help with the correct regex.
grep -E "^[:alnum:]::[:alnum:]\(\)[:space:]\[.*\]$" <file_name>
In python, below regex works , but not able to use the same with grep.
^.*::.*\(\) \[.*\]$