Hi Alex > Alex wrote: > 1. the syntax diagram is (I think) wrong (or at least misleading) .... > >> filter [{lines | items | keys | elements} of] *filterSource* {with | without >> | [not] matching} [{wildcard pattern | regex pattern}] *filterPattern* [into >> *targetContainer*] >> > in particular, the bit that says .... [{wildcard pattern | regex pattern}] > .... > > It implies that it is optional to have anything there - and that if you do, > then it can be either one or the other. Nothing there indicates that the > alternatives are > > alternative one: "wildcard pattern" or nothing, > alternative two: "regex pattern". > > Maybe it could be > > filter [{lines | items | keys | elements} of] *filterSource* {with | without > | [not] matching} {[wildcard pattern] | regex pattern} *filterPattern* [into > *targetContainer*] > > (i.e. moving the option [...] inside the alternate {...} - which I think > gives equivalent possibilities, but makes it clearer which is which; clearer > at least to me :-) The problem there is that it is an option. The default if nothing is expressed is that it is a wildcard pattern. So filter lines of x with “a” is the same as Filter lines of x with wildcard pattern “a”
However, specifying regex pattern explicitly ensures that the filterpattern is handled as a regex. > 2. Explicitly say in the description that the phrase "regex pattern" is > required if the filterpattern is to be interpreted as a regex, while the > alternative "wildcard pattern" is optional, and is the default, used if > neither of those phrases occurs. This is bang on the money and should definitely be added to ensure there is never any confusion. I’ll implement right away. Thanks Sean _______________________________________________ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode