Re: question about text operation using regex.

2008-08-08 Thread Dr.Ruud
"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

Re: question about text operation using regex.

2008-08-06 Thread Chris Charley
- 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

Re: question about text operation using regex.

2008-08-06 Thread John W. Krahn
[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

Re: question about text operation using regex.

2008-08-06 Thread asmith9983
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

Re: question about text operation using regex.

2008-08-05 Thread John W. Krahn
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

Re: question about text operation using regex.

2008-08-05 Thread Chris Charley
- 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

Re: question about text operation using regex.

2008-08-05 Thread Chris Charley
- 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

question about text operation using regex.

2008-08-05 Thread Remy Guo
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