Add tags

Add tags to the following comment

Pythonの場合、正規表現がいらないようなマッチなら文字列のreplaceメソッドを使う。正規表現が必要なら正規表現ライブラリのsubメソッドを使う。

1
2
3
4
5
>>> "2007-06-07".replace("-", "/")
'2007/06/07'
>>> import re
>>> re.sub("\d+", "*", "2007/06/07")
'*/*/*'

Add tags

The input will be splited to tags with space.

Index

Feed

Other

Link

Pathtraq

loading...