如何删除包含javadoc注释的整行?

时间:2013-02-28 08:28:38

标签: regex eclipse replace

如何使用Eclipse 查找/替换提示删除仅包含javadoc注释的行。
我有以下情景,

/** The panel. */
private JPanel panel;
/** The text field. */
private JTextField textField1;
/** The text field_1. */
private JTextField textField2;
/** The button. */
private JButton button;
/** The combo box. */
private JComboBox comboBox; 

现在我要删除包含 / **
的整行 我应该在 eclipse 中使用正则表达式搜索并删除行

1 个答案:

答案 0 :(得分:1)

/\*\*.*\r?\n?

匹配以/**开头的整行,包括(如果存在)任何后续换行符。

/\*\*.*?\*/

匹配单个评论。