Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Un-patch: new pattern matching code
- X-seq: zsh-workers 7410
- From: "Bart Schaefer" <schaefer@xxxxxxxxxxxxxxxxxxxxxxx>
- To: "Zsh hackers list" <zsh-workers@xxxxxxxxxxxxxx>
- Subject: Re: Un-patch: new pattern matching code
- Date: Mon, 9 Aug 1999 17:23:03 +0000
- In-reply-to: <001a01bee240$25c71160$21c9ca95@xxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
- References: <001a01bee240$25c71160$21c9ca95@xxxxxxxxxxxxxx>
On Aug 9, 12:21pm, Andrej Borsenkow wrote:
} Subject: RE: Un-patch: new pattern matching code
}
} >
} > There is ${(MSI:n:)...#...}, where n is a number. BTW, it looks like (M)
} > doesn't work right with ${.../...}. Am I missing something?
}
} At least, this is explicitly stated in the manual :-)
D'oh! I even edited that text when it appeared. But clearly it ought to be
repeated in the "Parameter Flags" subsection.
Index: Doc/Zsh/expn.yo
===================================================================
@@ -697,8 +697,9 @@
)
enditem()
-The following flags are meaningful with the tt(${)...tt(#)...tt(}),
-tt(${)...tt(%)...tt(}), or tt(${)...tt(/)...tt(}) forms.
+The following flags are meaningful with the tt(${)...tt(#)...tt(}) or
+tt(${)...tt(%)...tt(}) forms. The tt(S) and tt(I) flags may also be
+used with the tt(${)...tt(/)...tt(}) forms.
startitem()
item(tt(S))(
} What would you like to do with (M) in this case?
I was expecting it to reverse the sense of the pattern match, and thus
substitute the NON-matching substrings by the replacement string. However,
it's probably more sensible the way it is.
--
Bart Schaefer Brass Lantern Enterprises
http://www.well.com/user/barts http://www.brasslantern.com
Messages sorted by:
Reverse Date,
Date,
Thread,
Author