This is a small but useful tip to use Find/Replace in eclipse easily using regex.

This example is to comment all the lines containing a word (selectedWord)

Steps : 

  • Ctrl + F
  • Find ^.*selectedWord.*$
  • Replace //$0
  • Options : Check Regular Expressions

Screenshot from 2014-06-29 08:17:52

Advertisements