<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>rubytips86</author_name>
  <author_url>https://blog.hatena.ne.jp/rubytips86/</author_url>
  <blog_title>Ruby Tips!</blog_title>
  <blog_url>https://rubytips86.hatenablog.com/</blog_url>
  <categories>
  </categories>
  <description>Rubyの正規表現ではメタ文字\sが空白文字にマッチする。空白文字とは文字クラス[ \t\r\n\f]のことであり、半角スペースのほかタブや改行文字にもマッチする。以下はString#gsubにより文字列から空白文字をすべて除去する例である。 p &quot; \t\rfoo\n\f&quot;.gsub(/\s/, '') #=&gt; &quot;foo&quot; 空白文字に全角スペースが含まれないことに注意が必要である。全角スペースも含めて空白文字をマッチしたい場合は、文字クラスを使って以下のようにする。 p &quot; \t\rfoo\n\f&quot;.gsub(/[\s ]/, '') #=&gt; &quot;foo&quot;</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Frubytips86.hatenablog.com%2Fentry%2F2014%2F03%2F28%2F132119&quot; title=&quot;正規表現で空白文字をマッチさせる - Ruby Tips!&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>2014-03-28 13:21:19</published>
  <title>正規表現で空白文字をマッチさせる</title>
  <type>rich</type>
  <url>https://rubytips86.hatenablog.com/entry/2014/03/28/132119</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
