Grepping portions of multiline text using Filter Operator

Hi,

i have the following text where i want to grep the greenish highlighted portions out. As far i can see, there is no “easy-to-use” TW5 builtin-filter that returns the regexp-groups (the used regexp is (\\procedure.*?\\end) in the depicted example):

Basically i want to receive two entries in the filter including the \n's.

The example string on the picture is:

\procedure abc()
bla
\end

function func() jjj

\procedure kkk()
bli
\end

Thanks for any help or doc-pointers!

What’s the purpose of those filters? What do you try to achieve as an end result?

TW wikitext is not designed to be used that way. With functions regexps are doable but the code will get complex.