regex question....




Gang,

I was tried to find Jeffrey Friedl's email to figure out some quick
regex when it struck me that the list can clue me in.... [[I have
figured this out myself several times--well, 3 or 4 anyway--but it
was more trial/error than I need.]]

I have a file with ints from 0 to some N. What is the regex for vi
or vim to use that will catch them all in one substititon command?

I have tried :1,$/s/[0-9]][0-9][0-9]/foo/g

or things very close to that. Zip. I could have sworn that I noted
it dow n somewhere; cannot find.

tia.


--
Gary Kline kline@xxxxxxxxxxx http://www.thought.org Public Service Unix
Journey Toward the Dawn, E-Book: http://www.thought.org
The 7.97a release of Jottings: http://jottings.thought.org

_______________________________________________
freebsd-questions@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscribe@xxxxxxxxxxx"



Relevant Pages

  • Re: RegEx
    ... Dennoch aendert das nix an der Tatsache das Man mit dem Grundwissen zu regulären Ausdrücken, was man aus diesem Buch gewinnen kann in der Lage ist in allen Sprachen die Regex unterstützen zurecht zu kommen. ... Da habe ich Jeffrey Friedl aber ganz anders verstanden. ... Ein Regex bleibt ein Regex. ...
    (microsoft.public.de.german.entwickler.dotnet.csharp)
  • Re: regex search and replace
    ... Tad McClellan wrote: ... struck me that just testing the 10th character is far from similar to the OP's regex. ... And, assuming that there is a need to use that regex for identifying the lines, why not start from there? ...
    (comp.lang.perl.misc)
  • Re: Juggling Universe - Juggling Social Network
    ... a regex that's 6598 bytes long (See Appendix B of "Mastering Regular ... by Jeffrey E.F.Friedl, published by O'Reilly) ... Okay, you've said too much. ...
    (rec.juggling)
  • Re: regex: listing all textstrings to be found more that 2 times in a file
    ... Mastering Regular Expressions ... by Jeffrey E. F. Friedl ... Maybe if I have time I'll give you a regex that does what you ask. ...
    (comp.os.linux.misc)
  • Re: Juggling Universe - Juggling Social Network
    ... a regex that's 6598 bytes long (See Appendix B of "Mastering Regular ... by Jeffrey E.F.Friedl, published by O'Reilly) ... Okay, you've said too much. ...
    (rec.juggling)