[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: ListMatch Clarification
> >> caseIgnoreListSubstringsMatch has the same basic substrings
> >> semantics as caseIgnoreSubstringsMatch. Instead of matching
> >> against a single directory string, the former matches against
> >> a list of directory strings (lines). The initial substring, if
> >> asserted, must match the beginning of the first line. The
> >> final substring, if asserted, must match the end of the last
> >> line. Each any substrings match in between. The matched
> >> portions must not overlap each other, must not span lines,
> >> and must appear in the same order as the substrings. Multiple
> >> matched portions, however, may be in the same line... and
> >> some lines may have no matched portions.
> >
> >
> >Ok so, caseIgnoreListSubstringsMatch is no different than
> >caseIgnoreSubstringsMatch -except- for:
> >
> >A. the list is effectively concatenated into one line
> >B. there are "markers" where there were line breaks that no single pattern
> > can cross
> >C. \'s and $'s are handled so that they can be escaped out
> >
> >Does that sound right?
>
> Yes.
Excellent. So I've been looking at what it would take to implement this,
and here is how I "think I should implement it". I'd definitely like
feedback before going through with this. I also have a side question, but
I'll get to this. First of all, here's how I propose that I would
implement this:
given: A. is the query string
B. is the entity within the ldap db I am comparing against
1. convert A to "escaped" format by running that escape command on it
(assuming that is a real command haven't looked at that) escape
out $ and \
2. convert B by turning the line separator $ into a ^M (ctrl-M) (or a \n
not sure which would be better there)
3. turn the converted A and B over to caseIgnoreSubstringsMatch for
comparison
This does mean that an added side effect is that you could actually
-match- those newlines using ^M or \n, depending on which were used.
Personally, I don't think anything is wrong with that. ;)
If I can do that, then my second question is moot. If I can not allow the
newline to be matchable at all, then how is it possible to do a
non-substrings match?
Daniel
--
/\\\----------------------------------------------------------------------///\
\ \\\ Daniel Henninger http://www.vorpalcloud.org/ /// /
\_\\\ North Carolina State University - Systems Programmer ///_/
\\\ Information Technology <IT> ///
"""--------------------------------------------------------------"""