HTML ファイル中に含まれるタグを抽出するワンライナー

$ ruby -ne ‘puts $_.downcase.scan(%r|]*>|i)’ ./index.html | sort | uniq
a
body
br
dd
div
dl
dt
h1
h2
h3
h4
head
html
img
input
li
link
meta
p
script
title
ul

ね、簡単でしょ?

Posted in: Linux, Ruby, Tech by Yuya Takeyama No Comments
Get Adobe Flash playerPlugin by wpburn.com wordpress themes