I got a bunch of files, and I want to find out the content between two tags st
and et
.
if I use grep "st.*et" files
, I will get these two tags involved in the result.
Such as st Hello world! et
.
But I just need the Hello world!
part.
Is there a way to show only the content between the tags using grep(or other regex tools)?
PS: I know how to use tools such as AWK
, python
to do further-processing with these results to reach my goal. But I just wonder there could be a more direct way to do that.
<st>
? Or just the stringst
? Wouldfoostbar
count? Will the two "tags" always be on the same line or do you need to match across multiple lines?