以下は一致しているよう,
です 誰かが理由を説明できますか?
カンマで終わる複数の数値またはポイントに一致させたいです。
123.456.768,
123,
.,
1.2,
しかし、次のことを行うと予期せず印刷され,
ます
my $text = "241.000,00";
foreach my $match ($text =~ /[0-9\.]+(\,)/g){
print "$match \n";
}
print $text;
# prints 241.000,
# ,
更新:
コンマが一致した理由:
ここでIn list context, //g returns a list of matched groupings, or if there are no groupings, a list of matches to the whole regex
定義されているとおり。