"John W. Krahn" schreef:
> [EMAIL PROTECTED] wrote:
>> The following Perl one-liner will do what you need
>> perl -n -e 's/(.{8,8}).(.*)/$1$2/;print ;'
>
> Or more simply as:
>perl -pe's/^(.{8})./$1/'
And a bit less simply as:
perl -pe's/(?<=.{8}).//'
--
Affijn, Ruud
"Gewoon is een
- Original Message -
From: ""Remy Guo"" <[EMAIL PROTECTED]>
Newsgroups: perl.beginners
To: "Perl Beginners"
Sent: Tuesday, August 05, 2008 10:14 PM
Subject: question about text operation using regex.
hi all,
i have a txt log file and i want to de
[EMAIL PROTECTED] wrote:
The following Perl one-liner will do what you need
perl -n -e 's/(.{8,8}).(.*)/$1$2/;print ;'
Or more simply as:
perl -pe's/^(.{8})./$1/'
John
--
Perl isn't a toolbox, but a small machine shop where you
can special-order certain sorts of tools at low cost and
in sho
y wrote:
- Original Message - From: "Chris Charley" <[EMAIL PROTECTED]>
To:
Sent: Tuesday, August 05, 2008 10:45 PM
Subject: Re: question about text operation using regex.
- Original Message - From: ""Remy Guo"" <[EMAIL PROTECTED]>
N
Remy Guo wrote:
hi all,
Hello,
i have a txt log file and i want to delete the 9th character of each line.
how can i do it using regex?...thanks!
It would be easier to use substr():
substr $line, 8, 1, '';
John
--
Perl isn't a toolbox, but a small machine shop where you
can special-order
- Original Message -
From: "Chris Charley" <[EMAIL PROTECTED]>
To:
Sent: Tuesday, August 05, 2008 10:45 PM
Subject: Re: question about text operation using regex.
- Original Message -
From: ""Remy Guo"" <[EMAIL PROTECTED]>
News
- Original Message -
From: ""Remy Guo"" <[EMAIL PROTECTED]>
Newsgroups: perl.beginners
To: "Perl Beginners"
Sent: Tuesday, August 05, 2008 10:14 PM
Subject: question about text operation using regex.
hi all,
i have a txt log file and i want to d
hi all,
i have a txt log file and i want to delete the 9th character of each line.
how can i do it using regex?...thanks!
-Remy