<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>iken0</author_name>
  <author_url>https://blog.hatena.ne.jp/iken0/</author_url>
  <blog_title>ロバの耳</blog_title>
  <blog_url>https://iken0.hatenadiary.org/</blog_url>
  <categories>
    <anon>ruby</anon>
    <anon>array</anon>
  </categories>
  <description>a = [1,2,2,3,4,6,1,3,7,8,9] p a.index(3); #=&gt; 3 p a.index(5); #=&gt; nil # bで始まる単語を探す b = %w[red green blue white black] p b.find() {|x| x=~/\Ab/} #=&gt; &quot;blue&quot; 1.9以降では p b.index {|x| x=~/\Ab/} こういう書き方で，位置を取れるらしい．うちのrubyは1.8.xだ．</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fiken0.hatenadiary.org%2Fentry%2F20070525%2Fp2&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>2007-05-25 00:00:02</published>
  <title>テストを通る最初の要素(の位置)を取得する</title>
  <type>rich</type>
  <url>https://iken0.hatenadiary.org/entry/20070525/p2</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
