I want to match everything that is between some lines with regexp but not this that match the start and the end. This sound to me as positive lookbehind and positive lookahead
start text bla bla bla end
There are multiple number of this kind of blocks so i would like to extract all this blocks and then for each of these blocks i would like to extract something based on a different regexp.So it should be something like:
match start then match everything until the first occurrence of end match start then match everything until the first occurrence of end
and so on...
so i made sth like this: (?<=start).*(?=end)
This does not work because i guess i use the command line grep with treats the file as a set of lines and tries to apply the regex in every single line. Is there any way to treat the file as a whole line or this is not a good solution and i have to use a combination of various command line tools like extracting the text with sed and then build a file whose lines contains the concatenation of various lines from the initial file?