regex - Regexp for all text between two lines -


i match text that

my  begin line not useful text cannot match because don't know how composed end line 

i'd match text above, problem right cannot match text first line regext that:

my begin line\n.*my end line 

so confused, ?

to print lines between 2 patterns, excluding lines containing patterns use:

sed -n '/my begin line/,/my end line/ {/my begin line/n;/my end line/!p}' file 

Comments

Popular posts from this blog

Capture and play voice with Asterisk ARI -

c++ - Can not find the "fiostream.h" file -

visual studio - Installing Packages through Nuget - "Central Directory corrupt" -