On Thursday 17 September 2009 17:00:37 Newbie407 wrote:

> Two items. First, when I say "variable text" I just mean that there can be
> text of any length between the "LEC" and the carriage return.

Ok, but you don't say how, for example, the following should be considered:

aaa LEC foo bar baz ulty abc def LEC yyy xxx ulty

is that two instances of your pattern, or a single one, or it can never 
happen?

> But I'm confused when you say that Grep can't do replacements.  I'm using
> this in the context of TextWrangler, and it's all about finding and
> replacing text.  Maybe my newness is standing out here. . . .

I don't know what textwrangler is, but grep itself is a tool that only does 
pattern matching, ie print lines matching a pattern. No text replacement is 
possible with grep alone.

-- 
D.


Reply via email to