[X-Unix] Any CLI multi-line regex find utilities out there?

James Avgeris jima at itempo.com
Wed Oct 27 17:27:49 PDT 2004


On Oct 27, 2004, at 5:04 AM, Jakob Peterhänsel wrote:

> Hi All,
>
> I though grep could do it, as BBEdit's version can, but got 
> disappointed. Grep can't find over multi-lines...
>
> So, is there any CLI solutions out there that can return a match on 
> text over multi lines???
>
> I would like to do something like:
>
> echo 'my very long text from a email body' | myRegexCmd 'regex 
> expression'
>
>
> Any help appreciated!

Here's a BBEdit solution. If your file is:

very long
text string

and your regexp is:

very[\s]long[\s]text

BBEdit will highlight "very long text", even though there's a line 
break between "long" and "text". (The \s represent any whitespace 
character, such as spaces, tabs and newlines.)



More information about the X-Unix mailing list