Advertisement

12.07.2007 at 06:55AM PST, ID: 23008681
[x]
Attachment Details

Use Perl script with vi

Asked by dwcronin in Perl Programming Language, Regular Expressions

Tags: script, use

I know vi and a bit of Perl and a bit of regex.  I would like to use then to solve my problem.

I want to edit my program files in vi.  There are lines like:

// major change history
//   06/08/00   jhs   initial creation
//   12/22/05   gam  formatting

I would like it to read:

// major change history
//   2000-06-08   jhs   initial creation
//   2005-12-22   gam  formatting

Is there a way to quickly do this in vi?  My dream solution is to use vi to call a Perl script using regex to solve this.Start Free Trial
[+][-]12.07.2007 at 12:50PM PST, ID: 20430727

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Perl Programming Language, Regular Expressions
Tags: script, use
Sign Up Now!
Solution Provided By: ozo
Participating Experts: 1
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628