<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>t_amago</author_name>
  <author_url>https://blog.hatena.ne.jp/t_amago/</author_url>
  <blog_title>Domo-Domo</blog_title>
  <blog_url>https://t-amago.hatenadiary.org/</blog_url>
  <categories>
    <anon>JS</anon>
  </categories>
  <description>replaceの置換で関数を使った場合、その関数に渡る引数の数は3つあるらしい。 実際に置換する数だけalertを使って表示させてみたら var str = 'aabaacaadaae'; str.replace(/[b-e]/ig, function() { alert([ arguments[0], arguments[1], arguments[2] ].join('\n')); }); 結果がこれ [1回目] b 2 aabaacaadaae [2回目] c 5 aabaacaadaae [3回目] d 8 aabaacaadaae [4回目] e 11 aabaacaadaae第一引…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Ft-amago.hatenadiary.org%2Fentry%2F20090516%2Fp1&quot; title=&quot;replaceの引数 - Domo-Domo&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-05-16 00:00:00</published>
  <title>replaceの引数</title>
  <type>rich</type>
  <url>https://t-amago.hatenadiary.org/entry/20090516/p1</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
