$0
will be the placeholder for entire matched content.
Input:
line1
line2
line3
Find by regex: .*
Replace to: '$0',
Result:
'line1',
'line2',
'line3',
$1
, $2
, $3
will be the group representation used in replace string.
A ()
will represent a group in find by.
Input:
HIGH("high"),
MEDIUM("medium");
Find by regex: (.*)\((.*)\)[,|;]
Replace to: String $1 = $2;
Result:
String HIGH = "high";
String MEDIUM = "medium";