Deleting a line and joining the next

General questions about using TextPad

Moderators: AmigoJack, bbadmin, helios, MudGuard

Post Reply
ngdoherty
Posts: 4
Joined: Tue May 12, 2009 2:08 pm

Deleting a line and joining the next

Post by ngdoherty »

Hi

I have a line of text which I can delete - but I need to join the lines above and below


<?php endif;
echo "Delete This Line";
?>

So it end up with

<?php endif;?>

How do I do that?

Note the line above may NOT always be <?php endif;
But the last line will always be ?>

Hope I'm making sense.

Thanks
ben_josephs
Posts: 2464
Joined: Sun Mar 02, 2003 9:22 pm

Post by ben_josephs »

How do you identify the lines to delete?

By the text of the line itself?
Find what: \necho "Delete This Line";\n
Replace with: [nothing]

[X] Regular expression
Or by the text of the line that follows?
Find what: \n.*\n\?>
Replace with: ?>

[X] Regular expression
Or by both?
Find what: \necho "Delete This Line";\n\?>
Replace with: ?>

[X] Regular expression
Note that these don't use regular expressions, but TextPad only interprets \n as a newline (in both the search and replacement expressions) if you select Regular expression.
Post Reply