Some cases, I have to replace/delete lines starts with particular word like \'public\' \'private\' Java classes or
for XML file.
See the image:
^\s+<version>.*$
use this regexp: ^\s+<version>.*$
This will remove all lines starting with <version>
. Make sure you have checked the checkbox "Regular expression"
Use the following regular expression to hide lines starting with 'public' -
Regex Line Replacement
public(.*)\R
Eclipse Config
Example