<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>thinkAmi</author_name>
  <author_url>https://blog.hatena.ne.jp/thinkAmi/</author_url>
  <blog_title>メモ的な思考的な</blog_title>
  <blog_url>https://thinkami.hatenablog.com/</blog_url>
  <categories>
    <anon>Ruby</anon>
  </categories>
  <description>最近、Rubyで文字列の字句解析を行う機会がありました。 何を使えばよいか考えたときに、最初に思い浮かんだのが Regexp#match でした。 class String (Ruby 3.3 リファレンスマニュアル) 他にもないか調べたところ、文字列スキャナクラス StringScanner がありました。 class StringScanner (Ruby 3.3 リファレンスマニュアル) StringScannerは、Regexpと同じように正規表現を使うのに加え、 スキャンし終わった位置のインデックスであるスキャンポインタを持つ bol? や eos? でスキャンポインタが先頭・末尾で…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fthinkami.hatenablog.com%2Fentry%2F2024%2F11%2F30%2F173612&quot; title=&quot;RubyのStringScannerを使って、文字列をスキャンしてみた - メモ的な思考的な&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>https://cdn.blog.st-hatena.com/images/theme/og-image-1500.png</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2024-11-30 17:36:12</published>
  <title>RubyのStringScannerを使って、文字列をスキャンしてみた</title>
  <type>rich</type>
  <url>https://thinkami.hatenablog.com/entry/2024/11/30/173612</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
