I would like to search a .java file using Regular Expressions and I wonder if there is a way to detect one what lines in the file the matches are found.
.java
Fo
If you are using a Unix based OS / terminal, you could use sed:
sed -n '/regex/=' file
(from this StackOverflow response)