I’m trying to get only content between body tag
here is an example file
<html>
<head>
<tite>
Test1
</title>
</head>
<body>
Hello World!
</body>
</html>
I tried
grep "\<body\>.*\<\/body\>" index.html
But it just returns nothing (doing -v returns the entire thing to make sure its the right file).
Thanks
You cannot use
grepfor multiline pattern matching. Use awk instead:Will return: