2007-10-08から1日間の記事一覧

[perl] [ruby] post_match

Rubyのpost_matchって、perlの場合、「$'」こいつを参照すれば終わりだった。 1 use strict; 2 use warnings; 3 4 my $string = 'test'; 5 6 if( $string =~ /s/ ) { 7 warn $'; 8 } t at test.pl line 7. http://www.ruby-lang.org/ja/man/?cmd=view;name=M…