Python, Perl, memo | 20:02 | 次のPerlスクリプトとPythonスクリプトは同等の処理を行う。Perl #!/usr/bin/env perl use strict; use warnings; my $str = "testhoge"; if($str =~ /(hoge)/){ print $1; } Python #!/usr/bin/env python import re r = re.compile('(?Phoge)') result = r.match('hogetest') print result.group('re1') どちらも、結果として「hoge」という文字列を出力する。
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く