Ignore all text between lines?

Post Reply
twixt
Posts: 10
Joined: Sun Aug 23, 2015 8:15 pm

Ignore all text between lines?

Post by twixt »

For instance, if there are lines
Predetermined text here, which is always the same
Text to ignore
more text to ignore
continue ignoring; goes on for varying lengths
End of predetermined text, always the same (small variants but those can be accounted for using perl regex).
I want to see "Predetermined text here," then "End of predetermined text." and ignore/clear everything in between. How would I go about doing this? I assume something with line captures? Anyone done something similar they can share?

twixt
Posts: 10
Joined: Sun Aug 23, 2015 8:15 pm

Re: Ignore all text between lines?

Post by twixt »

So I figured out by using a trigger chain that starts with matching "Predetermined text here" and then in the next link deleting the line and repeating, with a 'stop' trigger for the "End of predetermined text" which then uses SetTriggerStayOpen to turn off the other two... one problem; it's also deleting the two 'border' lines, but I want those to stay. How should I make that happen?

twixt
Posts: 10
Joined: Sun Aug 23, 2015 8:15 pm

Re: Ignore all text between lines?

Post by twixt »

Figured it out, just used a 'match everything except End of predetermined text' regex on the delete line trigger

^(?!Predetermined text here).*$

Post Reply