Re: pattern equality test?
From: Michael Mendelsohn (keine.Werbung.1300_at_michael.mendelsohn.de)
Date: 03/19/04
- Next message: Ralf: "Disabling serial port FIFO under Linux"
- Previous message: Arthur J. O'Dwyer: "Re: pattern equality test?"
- In reply to: Arthur J. O'Dwyer: "Re: pattern equality test?"
- Next in thread: Arthur J. O'Dwyer: "Re: pattern equality test?"
- Reply: Arthur J. O'Dwyer: "Re: pattern equality test?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 19 Mar 2004 01:25:29 +0100
"Arthur J. O'Dwyer" schrieb:
> > Just a note: make sure the matches in your steps 1. and 2. are both
> > matched both ways each time.
> > Example (from my post): "ab*xyz" and "abc*yz" match because "ab*"
> > matches "abc*" and "*yz" matches "*xyz" (even though "*xyz does not
> > match "*yz").
>
> Uh-huh. I wasn't thinking in terms of regex matching with the
> [pre|suf]fixes. I considered "abc" and "ab" (note lack of asterisks)
> to "match prefix-wise" because they were the same up to the length of
> the smaller; likewise, "yz" and "xyz" match suffix-wise.
Ah, ok. Thanks for the clarification.
> I was going to post code, but when I started writing the code was
> when I found the bugs in my algorithm. And now that I've clarified
> the algorithm, the code is trivial enough to make it not worth my
> while. ;-)
Personally, I like explanations of algorithms better than unexplained
code (which is likely not what you intended to do, but I've been
thinking about this, and you gave me the opportunity to say it). I
realize this is not comp.explanations, but rather comp.programming, but
after all it's supposed to be neither language nor OS-specific, and some
C code that gets posted is pretty language specific (using array index
-1, for example)...
Michael
-- Feel the stare of my burning hamster and stop smoking!
- Next message: Ralf: "Disabling serial port FIFO under Linux"
- Previous message: Arthur J. O'Dwyer: "Re: pattern equality test?"
- In reply to: Arthur J. O'Dwyer: "Re: pattern equality test?"
- Next in thread: Arthur J. O'Dwyer: "Re: pattern equality test?"
- Reply: Arthur J. O'Dwyer: "Re: pattern equality test?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|