<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>potisan</author_name>
  <author_url>https://blog.hatena.ne.jp/potisan/</author_url>
  <blog_title>potisanのプログラミングメモ</blog_title>
  <blog_url>https://potisan-programming-memo.hatenablog.jp/</blog_url>
  <categories>
    <anon>Python 3</anon>
    <anon>まとめ未登録（管理用）</anon>
  </categories>
  <description>Iterable（反復可能オブジェクト）の正規表現と一致する部分を数えるサンプルコードです。collections標準ライブラリのCounterクラスを使用しています。 import re from collections import Counter values = (&quot;ab1111&quot;, &quot;ab1112&quot;, &quot;ac2111&quot;, &quot;ac2112&quot;, &quot;ad2112&quot;, &quot;ad2113&quot;) #正規表現パターンの準備 #このコードでは最初の一致部分を使用します。 pattern = re.compile(r&quot;^a.+(\d\d)$&quot;) #カウンターオブジェクトの作成 #Counterの仕様からジ…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fpotisan-programming-memo.hatenablog.jp%2Fentry%2F2021%2F07%2F25%2F180817&quot; title=&quot;Python3 反復可能オブジェクトの正規表現と一致する部分を数える - potisanのプログラミングメモ&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>2021-07-25 18:08:17</published>
  <title>Python3 反復可能オブジェクトの正規表現と一致する部分を数える</title>
  <type>rich</type>
  <url>https://potisan-programming-memo.hatenablog.jp/entry/2021/07/25/180817</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
