Stewart Stremler wrote:
begin  quoting John H. Robinson, IV as of Fri, Feb 02, 2007 at 09:38:56AM -0800:

Ralph Shumaker wrote:

Ralph Shumaker wrote:


Examples:
 ^9And ...
 ^10 For ...

Needed to be:
 ^9 And ...
 ^10 For ...

If I had thought about regexen _before_ I did any insertions of a space between the numeric and the alpha, then I wouldn't even have needed to qualify the alpha,

Except - you would have ended up with:

 ^9 And ...
 ^10  For ...

Note the double space before the For. You were very correct in
specifying that the alpha had to be right next to the numeric.


IIRC, he did string-substitution to insert that space.  He came to
the list to take care of the tedious and boring problem after he'd
started. (Right, Ralph?)

Right you are, Stewart.


Also, \d and \w are Perl Compatilble Regular Expression (PCRE) syntaxes.
My testing shows they don't work in vi(m).


In vi, I you can use [:digit:], but [0-9] is shorter and backwards
compatible to vi.  Likewise [:space:].

If this was going to be more than a once-off change, then I'm bang
behind perl (or sed) for automating this.

Agreed. I got my feet wet in Perl a long time ago. I remember just enough that I wouldn't be totally lost if I were to wade in again.


--
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-list

Reply via email to