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

ruby - Trying to change last to "x"s to 23 -

jquery - Clone last and append item to closest class -

c - Unrecognised emulation mode: elf_i386 on MinGW32 -