MLUG: Re: [MLUG] Vi Regex problem
Re: [MLUG] Vi Regex problem
Email address obfuscation in effect -- please click here to turn it off.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
On Thu, Apr 04, 2002 at 11:31:29PM -0600, Mike Miller wrote:
> > Try somethinglike s/,([A-Z])/,"$1/g
> >
> > The parantheses (sp?) are a grouping operator and tell vi
> > to assign whatever matches the pattern inside them to the next
> > group variable ($1, $2, $3, ...) The $1 of course then references
> > the first grouping from the matching part of your re.
> 
> 
> Do you know if this can also be done somehow in sed?  I thought there was
> a correspondence between vi and sed on this sort of thing but I couldn't
> get sed to do this.

Not sure, most of my regex experience comes from perl which uses
egrep like regex's. Not sure how sed's regex support differs.

-- 
Scott Hussey
EMAIL:PROTECTED
GnuPG public key: http://www.lcl.lib.mo.us/~scott/pubkey.gpg.txt
  "Give a man a blanket and he is warm for the night. Set him on fire
   and he'll never bother you again."
--
To unsubscribe, go to http://mlug.missouri.edu/members/edit.php

Archives are available at http://mlug.missouri.edu/list-archives/