<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>teramako</author_name>
  <author_url>https://blog.hatena.ne.jp/teramako/</author_url>
  <blog_title>hogehoge @teramako</blog_title>
  <blog_url>https://teramako.hatenadiary.org/</blog_url>
  <categories>
    <anon>Perl</anon>
    <anon>JavaScript</anon>
  </categories>
  <description>split関数の挙動が違うことに最近気付いた。正確にはPerlの第3引数とJavaScriptの第2引数とでの挙動なんだけど。 JavaScriptの場合 var str = &quot;a b c d e f g&quot;; var array = str.split(/\s+/, 3); // array.toSource() = [&quot;a&quot;, &quot;b&quot;, &quot;c&quot;] Perlの場合 my $str = &quot;a b c d e f g&quot;; my @array = split(/\s+/, $str, 3); # $array = [&quot;a&quot;, &quot;b&quot;, &quot;c d e f g&quot;] Perlの場合は後続がそのまま最後の要…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fteramako.hatenadiary.org%2Fentry%2F20081004%2Fp2&quot; title=&quot;PerlのsplitとJavaScriptのsplit - hogehoge @teramako&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>2008-10-04 00:00:00</published>
  <title>PerlのsplitとJavaScriptのsplit</title>
  <type>rich</type>
  <url>https://teramako.hatenadiary.org/entry/20081004/p2</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
