S
sonet
my $keyword=shift;
$keyword=~s/(&.*?)$//;
print $keyword;
i want to replace the last word like &xyz.
ex:
if $keyword='123123;&12;212222&123' then output 123123;&12;212222
if $keyword='123123;&12;212222&123;' then output 123123;&12;212222&123;
but i alaways got the error result (123123
$keyword=~s/(&.*?)$//;
print $keyword;
i want to replace the last word like &xyz.
ex:
if $keyword='123123;&12;212222&123' then output 123123;&12;212222
if $keyword='123123;&12;212222&123;' then output 123123;&12;212222&123;
but i alaways got the error result (123123