<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>geiinbashoku2</author_name>
  <author_url>https://blog.hatena.ne.jp/geiinbashoku2/</author_url>
  <blog_title>鯨飲馬食コード</blog_title>
  <blog_url>https://geiinbashoku2.hatenadiary.org/</blog_url>
  <categories>
    <anon>Ruby</anon>
  </categories>
  <description>私はRubyをテキストファイルを一行ずつ入力し、処理して出力するという用途でよく使う。その時のメモ。よく使うのはIOクラスでファイルを読み込む方法。 #!/usr/bin/ruby #IO.rb in_file = ARGV.shift IO.foreach(in_file) do |line| if line =~ /^http\:\/\/d\.hatena\.ne\.jp\/(.+?)\// id = $1 puts id end end この例では&quot;http://d.hatena.ne.jp/id/&quot;からidを抜き出して出力する。urlset.txtにURLが一行ずつ書かれているとしてこ…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fgeiinbashoku2.hatenadiary.org%2Fentry%2F20090125%2Ftxt_input&quot; title=&quot;テキストファイル入力のメモ - 鯨飲馬食コード&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2009-01-25 00:00:00</published>
  <title>テキストファイル入力のメモ</title>
  <type>rich</type>
  <url>https://geiinbashoku2.hatenadiary.org/entry/20090125/txt_input</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
