How can I kill regular part in perl -


i have lot of following regular part in file want kill word between test1 , test2 how can in perl?

test1 xxx xxx xxx test2 ggg test1 xxx xxx test2 ggg 

use flip-flop operator:

$ perl -ne 'print unless /^test1$/ .. /^test2/' <<'end' test1 xxx xxx xxx test2 ggg test1 xxx xxx test2 ggg end 

output:

ggg ggg 

Comments

Popular posts from this blog

Unable to remove the www from url on https using .htaccess -