Kenny: -------------------------------------------------------------------------------- I want to remove a matching line, with remove I mean delete the line completely, not making it blank and only a carriage return. --------------------------------------------------------------------------------
The search and replace engine of PSPad works on single lines currently; you may use "copy non-matching" lines as sugested above, or you could try a multiline replacement script such as PhReplace http://forum.pspad.com/read.php?2,34061 replace RE: cite: -------------------------------------------------------------------------------- " \s+Logged In\s+ "-------------------------------------------------------------------------------- with: cite: -------------------------------------------------------------------------------- " "-------------------------------------------------------------------------------- (without quotes - as there are also some problems with using ^ $ \r \n in the replacement patern) The above needs newlines before and after the searched string, thus it won't match the first or last line. Alternatively you may try my dirty javascript for this (far less user friendly than PhReplace - for the beta version 4.5.3 2262 and above only): http://www.vbr.wz.cz/pspad/poor-man-s-REplace.html. The replace phrase would be: cite: -------------------------------------------------------------------------------- '/ \s+Logged In\s+ /g, " "'-------------------------------------------------------------------------------- (without '') or the equivalent> cite: -------------------------------------------------------------------------------- '/ \s+Logged In\s+(?= )/g, ""'-------------------------------------------------------------------------------- Neither this version will work on the first or last line; one can use e.g.: cite: -------------------------------------------------------------------------------- '/( \s+Logged In\s+(?= ))|(^\s+Logged In\s+ )|( \s+Logged In\s+$)|(^\s+Logged In\s+$)/g, ""'-------------------------------------------------------------------------------- After all, I think, the "copy non-matching" lines is the simplest solution. -- <http://forum.pspad.com/read.php?2,42652,42664> PSPad freeware editor http://www.pspad.com
