Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

3
  • This actually didn't work for me; I got no output at all. I changed the if($0~"\\<"tag) condition to if($0~"</"tag) and got the expected output, but not in the correct format (there was additional whitespace). Commented Nov 12, 2017 at 0:06
  • @igal Maybe now, answer edited (made even simpler), spaces removed. Commented Nov 12, 2017 at 2:15
  • @Arrow Yup! Very nice. Upvoted! Commented Nov 12, 2017 at 4:27