TCLUG Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [TCLUG:9061] regex
On Sat, 9 Oct 1999, Sandipan Panigrahi wrote:
> s/[^ ][^ ]*/'&'/g
Thanks. Worked like a charm.
Here's another question. I'm a bit confused by the /g aspect of regex
replacing in vi. Supposedly, it stands for "global" right? But it only
does the replace until the end of the line. Then if I do %&g, it will,
according to "Unix in a Nutshell", "Repeat the last change globally",
which DOES replace all over the file. Is this just a vi quirk, or what?
Luke