I'm trying to extract lines starting or ending a Java comment:
What I have is:
egrep "(/** | /* | */ | **/)" text.txt
I noticed that this works for all lines (such as /* comment */) except those that contain only /*, /**, **/ or */ and nothing preceding or following it.
Why is this?