Subject: Re: Re: [ast-users] Cutting strings from file
--------
> > this will do it
> > print "${buf/?(*$'\n')@(part5:*([^\n]))*/\2}"
>
> Could someone please dissect this? This looks almost as bad as Perl!
>
Read from left to right:
? optionally - the next () is optional
(*$'\n') * is anything terminating with $'\n' --- newline
@ followed by exactly one of
(part5:*([^\n])) part5: followed *() which mean zero or more of
the set of characters exclusing newline [^\n]
* anything else
/\2 Replace the pattern matched portion (which is everything)
with the part that matched the second () group, namely
@(part5:*([^\n]))
David Korn
[EMAIL PROTECTED]
_______________________________________________
ast-users mailing list
[email protected]
https://mailman.research.att.com/mailman/listinfo/ast-users