views:

50

answers:

2

The following pattern matches an entire line, how do I search and remove these lines. If I leave a space in the replace string, it leaves a blank in that particular line, when I do via eclipse.

^[\t ]*<param name="logic" .*$
+2  A: 

I don't know anything about eclipse but you may need to include the \n newline match in order to remove the line completely. Also - is it possible to replace with an empty string as opposed to a space?

^[\t ]*<param name="logic" .*\n$
El Ronnoco
I just don't want that line
Joshua
it works as expected
Joshua
Excellent. Thanks for the tick!
El Ronnoco
+1  A: 

To delete the line, you must also remove the line-break, not only the contents of the line. So your Expression should end with \r\n instead of $. Can't try it at the moment, so you will have to experiment yourself for the correct syntax.

Simpzon