<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>pknight</author_name>
  <author_url>https://blog.hatena.ne.jp/pknight/</author_url>
  <blog_title>(void*)Pないと</blog_title>
  <blog_url>https://pknight.hatenablog.com/</blog_url>
  <categories>
    <anon>Python3</anon>
  </categories>
  <description>入門Python3 7.1.5 subで文字列の置換ができます。 import re str1 = &quot;aa11bb22cc33bb&quot; str2 = re.sub(r'\d+',':',str1) print(str2) $ py main.py aa:bb:cc:bb グループ化して後方参照することもできます。 import re str1 = &quot;aa11bb22cc33bb&quot; str2 = re.sub(r'(\d+)',r'[\1]',str1) print(str2) $ py main.py aa[11]bb[22]cc[33]bb また関数を指定して後方参照を関数で受け取ることもでき…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fpknight.hatenablog.com%2Fentry%2F20170404%2F1491272167&quot; title=&quot;subによる文字列の置換 - (void*)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>2017-04-04 11:16:07</published>
  <title>subによる文字列の置換</title>
  <type>rich</type>
  <url>https://pknight.hatenablog.com/entry/20170404/1491272167</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
