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

c# - Can I intercept a SOAP response in .NET before a content type binding mismatch ProtocolException? -

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

python - Terminate a gnome-terminal opened with subprocess -