f



regular expressions

I'm in vi trying a global search and replace and I've exhausted my
abilities.  The string I'm trying to find is any alpha character followed by
a carot followed by a pipe and replace it with the same alpha character
followed by a pipe.  Basically eliminating the carot.

I can find my string with:
  /[A-Z]\^|
But I don't know how to replace the character found with [A-Z] with the
character found.  I've tried metacharacters . and * with no luck.  Basically
I've tried the follow, none of which work.  Any help?
  :1,$s/[A-Z]\^|/[A-Z]|/g
  :1,$s/[A-Z]\^|/.|/g            (and same with * instead of .)
  :1,$s/[A-Z]\^|/\.|/g           (and same with * instead of .)



0
jcwaters
6/23/2003 5:19:02 PM
comp.unix.programmer 10848 articles. 0 followers. kokososo56 (350) is leader. Post Follow

0 Replies
860 Views

Similar Articles

[PageSpeed] 41

Reply: