<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>TakamiChie</author_name>
  <author_url>https://blog.hatena.ne.jp/TakamiChie/</author_url>
  <blog_title>高見知英のかいはつにっし(β)</blog_title>
  <blog_url>https://blog.onpu-tamago.net/</blog_url>
  <categories>
    <anon>プログラミング</anon>
  </categories>
  <description>結局以下のようになりました while(/^(.+?)$/gmo) { my $line = $1; $nest++ if($line =~ /&lt;[^\/][^&gt;]+&gt;/); if($nest){ $result .= &quot;$line\n&quot;; }else{ $result .= &quot;&lt;p&gt;$line&lt;/p&gt;\n&quot;; } $nest-- if($line =~ /&lt;\/[^&gt;]+&gt;/); }PHPのコードに直すと、こんな感じか $nest = 0; $lines= explode(&quot;\n&quot;, $text); $text = &quot;&quot;; foreach($lines as $line) { if(preg…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fblog.onpu-tamago.net%2Fentry%2F20051201%2F1133420792&quot; title=&quot;&amp;lt;em&amp;gt;タグに囲まれてないところだけ&amp;lt;/em&amp;gt;段落にする(pで囲む) - 高見知英のかいはつにっし(β)&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>2005-12-01 16:06:32</published>
  <title>&lt;em&gt;タグに囲まれてないところだけ&lt;/em&gt;段落にする(pで囲む)</title>
  <type>rich</type>
  <url>https://blog.onpu-tamago.net/entry/20051201/1133420792</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
