DELETE TILL and DELETYE FROM

General questions about using WildEdit

Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard

Post Reply
martib
Posts: 19
Joined: Wed Aug 23, 2006 2:28 pm

DELETE TILL and DELETYE FROM

Post by martib »

hi!

what is the easiest way to delete all lines and signs (just everything)
from a file till a special word comes?

([[:alnum:]]+)stoprighthere did not work.


some for the rest. how do i delete everything from a word onward?
like: fromhere([[:alnum:]]+)

thanks! marti
ben_josephs
Posts: 2461
Joined: Sun Mar 02, 2003 9:22 pm

Post by ben_josephs »

To delete everything up to but not including stoprighthere:
Find what: .*stoprighthere
Replace with: stoprighthere

[X] Regular expression

Options
[ ] '.' does not match a newline character [i.e., not selected]
To delete everything from and including fromhere:
Find what: fromhere.*
Replace with: [nothing]
[X] Regular expression

Options
[ ] '.' does not match a newline character [i.e., not selected]
martib
Posts: 19
Joined: Wed Aug 23, 2006 2:28 pm

Post by martib »

Awesome!
Quick response which works perfect

Thanks a lot.
Marti
martib
Posts: 19
Joined: Wed Aug 23, 2006 2:28 pm

Post by martib »

how do i do for just deleting from the line beginning to a specific sign, like:

<start>every7847.,.thing what5449-*is here has to go<untilhere>
ben_josephs
Posts: 2461
Joined: Sun Mar 02, 2003 9:22 pm

Post by ben_josephs »

Please give examples of lines before and after the required deletion has been made.
martib
Posts: 19
Joined: Wed Aug 23, 2006 2:28 pm

Post by martib »

now it is :
<start>every7847.,.thing what5449-*is here has to go<untilhere>

afterwards should be like this:
<start><untilhere>
ben_josephs
Posts: 2461
Joined: Sun Mar 02, 2003 9:22 pm

Post by ben_josephs »

Find what: <start>.*?<untilhere>
Replace with: <start><untilhere>

[X] Regular expression
Might it be time to take a look at the help?
martib
Posts: 19
Joined: Wed Aug 23, 2006 2:28 pm

Post by martib »

thanks!

yeah, it really gets time to read and search more here.
Post Reply