I would like to search multiple files via eclipse for the following 2 lines:
@Length(max = L_255)
private String description;
and replace t
Search are multi-line by default in Eclipse when you are using regex:
(\@Length\(max = L_255)\)([\r\n\s]+private)
I would like to add "private String description;"
(\@Length\(max = L_255)\)([\r\n\s]+private\s+?String\s+description\s*?;)
replaced by:
\1, message="{validator.description.len}")\2
It works perfectly in a File Search triggered by a CTRL-H.
As mentioned in Tika's answer, you can directly copy the two lines selected in the "Containing Text" field: those lines will be converted as a regexp for you by Eclipse.