Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: pattern matching question



Frank Terbeck <ft@xxxxxxxxxxxxxxxxxx>:
> [snip]
> list=("... one giraffe ..." "... two cows ..." "... one monkey ..." "... three lemmings ...")

Sorry, for not reading your post close enough:
> slist=(${(M)list:#*one [a-z]*})

slist=(${${${(M)list:#*one [a-z]*}##*one }%%[^a-z]*})

> print old:
> print -l $list
> print "\nnew:"
> print -l $slist
> [snap]

Regards, Frank



Messages sorted by: Reverse Date, Date, Thread, Author