|
Re: Deleting all lines starting with // in all the java files of a java project [message #326044 is a reply to message #326012] |
Thu, 06 March 2008 04:18  |
Eclipse User |
|
|
|
Name <none@domain.invalid> writes:
> Hi,
> i'd like to delete all the lines in java files wich start with "//".
>
> I've tried to use the following regexp:
> Search ([\r\n]+)//.*$
> Replace $1
>
> But in the preview, the lines are replaced with empty lines. Is this a bug or is there another regexp to use ?
>
> TIA
The Replace says to keep the \r and \n characters so that is what is
happening. Just replacing with nothing will delete all the \r and \n
immediately before the // which should delete the // line and all
completely blank lines before it. If that is not what you want, then
search for a single end of line sequence before the // and replace
with nothing.
--
Owen Rees; speaking personally, and not on behalf of HP.
========================================================
Hewlett-Packard Limited. Registered No: 690597 England
Registered Office: Cain Road, Bracknell, Berks RG12 1HN
|
|
|
Powered by
FUDForum. Page generated in 0.02857 seconds