0
我不知道我在這裏做錯了什麼。爲什麼正則表達式塊不匹配,替代沒有發生。請幫忙。使用正則表達式替換或替換Perl
#!usr/bin/perl
use strict;
use warnings;
my $x = << "END";
// @@@ START COPYRIGHT @@@
//
// nth dimesion
//
// Copyright 2007
// nth dimension
// Protected as an unpublished work.
//
// The computer program listings, specifications and documentation
// herein are the property of nth dimension Company,
// L.P., or a third party supplier and shall not be reproduced,
END
$x=~s/\/\/\s+Copyright\s+\d{4}$/Copyright 2008/g;
print "$x\n";
打印$ x將打印相同的值。請幫助。
非常感謝你..它工作.. :) – May