<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>a-hisame</author_name>
  <author_url>https://blog.hatena.ne.jp/a-hisame/</author_url>
  <blog_title>Logic Dice</blog_title>
  <blog_url>https://a-hisame.hatenadiary.org/</blog_url>
  <categories>
    <anon>プログラム</anon>
    <anon>メモ</anon>
  </categories>
  <description>ふとしたツイートがきっかけで正規表現について調べてた。 問．先頭文字が任意の文字aで、その後にaがn回続く文字列とマッチする正規表現は作れるか。 実は、２つ解があって、正規表現をどちらの意味に取るかによって異なる。 A1. できない。(正確には、アルファベットの数が有限なら、一応できる。が、ものすごく冗長になる。) 正規表現を「正規言語と等価な正規表現」として解釈した場合。 A2. できる。(下記はJavaの例) &quot;aaaa&quot;.matches(&quot;(.)\\1{n}&quot;); // n=3ならtrue, それ以外ならfalse. 普段使う場合は２の意味で捉えてる人が多そうなんだけど、自分の場合は１の…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fa-hisame.hatenadiary.org%2Fentry%2F20120307%2F1331130841&quot; title=&quot;正規表現＝正規言語？ - Logic Dice&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>2012-03-07 23:34:01</published>
  <title>正規表現＝正規言語？</title>
  <type>rich</type>
  <url>https://a-hisame.hatenadiary.org/entry/20120307/1331130841</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
